首页 > 解决方案 > 沃尔玛市场 API JSON 模式

问题描述

Walmart 引入了新版本的 Marketplace API 架构 (v4):https ://developer.walmart.com/#/apicenter/marketPlace/latest#theItemObject 并且与以前的版本不同,它只提供 JSON 格式(以前的版本有 XSD模式)。我想将架构转换为实体,但事实证明这些文件实际上并不是经典的JSON Schema。有谁知道它是什么格式,是否有任何工具可以解析和转换它?

架构示例: https ://developer.walmart.com/xsd/marketplace/items/Spec-4.0/MP_ITEM_SPEC_4.0.json

{
    "Headers": {
        "key": "headers",
        "name": "Headers",
        "attributes": {
            "requestId": {
                "key": "request_id",
                "name": "Request ID",
                "xmlName": "requestId",
                "requirementLevel": "Recommended",
                "closedList": "N",
                "multiSelect": "N",
                "minDataLength": 1,
                "maxDataLength": 64,
                "isComplex": false,
                "isChild": false,
                "children": [
                    [
                        "Request ID",
                        "requestId"
                    ]
                ],
                "rank": 1000,
                "dataType": "String",
                "definitions": "Partner's ID of the feed, partner's ID to correlate feed and feed response.",
                "dataDefinitions": "Alphanumeric, 64 characters - Partner's ID of the feed, partner's ID to correlate feed and feed response."
            },
            "requestBatchId": {
                "key": "request_batch_id",
                "name": "Request Batch ID",
                "xmlName": "requestBatchId",
                "requirementLevel": "Recommended",
                "closedList": "N",
                "multiSelect": "N",
                "minDataLength": 1,
                "maxDataLength": 64,
                "isComplex": false,
                "isChild": false,
                "children": [
                    [
                        "Request Batch ID",
                        "requestBatchId"
                    ]
                ],
                "rank": 2000,
                "dataType": "String",
                "definitions": "Represents external generated batchId",
                "dataDefinitions": "Alphanumeric, 64 characters - Represents external generated batchId"
            },
            "feedDate": {
                "key": "feed_date",
                "name": "Feed Date",
                "xmlName": "feedDate",
                "requirementLevel": "Recommended",
...

标签: jsonschemawalmart-api

解决方案


自从这篇文章以来,架构已经对 v4.0 进行了重大更改

最新的架构在这里https://developer.walmart.com/image/asdp/us/mp/item/spec/4.0/MP_ITEM_SPEC_4.0.json


推荐阅读