wso2 数据映射器无法解析 json

wso2 data mapper unable to parse the json

所以我试图为这个 json 响应制作一个映射,但是当我使用数据映射器并从文件系统加载 json 文件时出现错误。

我使用数据映射器调解器来映射它。也许还有另一种方法可以做到这一点?

"Error occurred while opening file."

Reason: File content cannot be parsed.

这里是 json

{
    movie: [{
        omdbapi: {
            title: "The Legend of Tarzan",
            id: "tt0918940",
            runtime: "109 min",
            year: 2016,
            originaltitle: "The Legend of Tarzan",
            plot: "Tarzan, having acclimated to life in London, is called back to his former home in the jungle to investigate the activities at a mining encampment.",
            rating: "PG-13",
            genre: "Action, Adventure",
            director: "David Yates",
            thumb: "http://ia.media-imdb.com/images/M/MV5BMzY3OTI0OTcyMF5BMl5BanBnXkFtZTgwNjkxNTAwOTE@._V1_SX300.jpg"
        }
    }, {
        moviedbapi: {
            adult: false,
            backdrop_path: "/75GFqrnHMKqkcNZ2wWefWXfqtMV.jpg",
            belongs_to_collection: null,
            budget: 180000000,
            genres: [{
                name: "Action",
                id: 28
            }, {
                name: "Adventure",
                id: 12
            }],
            homepage: "http://legendoftarzan.com",
            id: 258489,
            imdb_id: "tt0918940",
            original_language: "en",
            original_title: "The Legend of Tarzan",
            overview: "Tarzan, having acclimated to life in London, is called back to his former home in the jungle to investigate the activities at a mining encampment.",
            popularity: 34.036008,
            poster_path: "/6FxOPJ9Ysilpq0IgkrMJ7PubFhq.jpg",
            production_companies: [{
                name: "Dark Horse Entertainment",
                id: 552
            }, {
                name: "Jerry Weintraub Productions",
                id: 2596
            }],
            release_date: "2016-06-29",
            revenue: 0,
            runtime: 109,
            spoken_languages: {
                name: "English",
                iso_639_1: "en"
            },
            status: "Released",
            tagline: "Human. Nature.",
            title: "The Legend of Tarzan",
            video: false,
            vote_average: 4.6,
            vote_count: 501
        }
    }]
}

您的示例模式可以在新的 WSO2 ESB 工具 5.0.0 Beta2 中正常导入。您可以从以下位置获取发布版本:https://github.com/wso2/devstudio-tooling-esb/releases/tag/v5.0.0-BETA2

Data Mapper 介体和工具已进行了大量改进,最好使用最新版本。