无效的Json至有效的json

时间:2018-09-17 05:53:14

标签: json hive

如何将json以下的内容转换为有效的json

{  
  "attribute_id":"r2d2",
  "attribute_values":[  
    WrappedArray(    [  
      5      b1ed5df4a0330a13a3b6f4c,
      {  
        "L0":{  
          "name":"ENTERTAINMENT",
          "id":"20000"
        },
        "L1":{  
          "name":"VIDEO GAMES BOOKS AND OTHER MEDIA",
          "id":"26000"
        },
        "L2":{  
          "name":"MEDIA",
          "id":"26001"
        },
        "L3":{  
          "name":"BOOKS",
          "id":"26100"
        },
        "L4":{  
          "name":"BOOKS MISC L4",
          "id":"26800"
        }
      },
      PRIORITY_OTHERS,
      1536662873016,
      26800
    ]    )
  ],
  "bu":"0",
  "item_id":"705024754",
  "last_updated_by":"QARTH",
  "mart":"0",
  "published_at":"1536662873017",
  "source":"RAMP",
  "timestamp":"1536662873016",
  "vertical":"0",
  "wpid":"7HX1KF1N9W9Y"
}

1 个答案:

答案 0 :(得分:0)

有效json应该是

 {
        "attribute_id": "r2d2",
        "attribute_values": [
            [{
                    "L0": {
                        "name": "ENTERTAINMENT",
                        "id": "20000"
                    },
                    "L1": {
                        "name": "VIDEO GAMES BOOKS AND OTHER MEDIA",
                        "id": "26000"
                    },
                    "L2": {
                        "name": "MEDIA",
                        "id": "26001"
                    },
                    "L3": {
                        "name": "BOOKS",
                        "id": "26100"
                    },
                    "L4": {
                        "name": "BOOKS MISC L4",
                        "id": "26800"
                    }
                },
                "PRIORITY_OTHERS",
                1536662873016,
                26800
            ]
        ],
        "bu": "0",
        "item_id": "705024754",
        "last_updated_by": "QARTH",
        "mart": "0",
        "published_at": "1536662873017",
        "source": "RAMP",
        "timestamp": "1536662873016",
        "vertical": "0",
        "wpid": "7HX1KF1N9W9Y"
    }

如果这不能回答您的问题,您可以发表您的SQL吗?