【问题标题】:I am trying to Process a json file but while checking from JsonLint I get error Expecting 'EOF', got ','我正在尝试处理一个 json 文件,但是在从 JsonLint 检查时出现错误 Expecting 'EOF', got ','
【发布时间】:2020-06-06 11:53:58
【问题描述】:

错误:第 12 行的解析错误: ...“不喜欢”:“真”},{“喜欢”:“真” ----------------------^ 期待'EOF',得到','

json:

{ “喜欢”:“真实”, "user_id": "101", "video_end_type": "3", "minutes_played": "3", "video_id": "101", “geo_cd”:“AP”, "channel_id": "11", "creator_id": "101", “时间戳”:“07/05/2019 01:36:35”, “不喜欢”:“真的” }, { “喜欢”:“真实”, "user_id": "102", "video_end_type": "null", "minutes_played": "4", "video_id": "102", “geo_cd”:“AP”, "channel_id": "12", "creator_id": "102", “时间戳”:“15/04/2019 17:04:00”, “不喜欢”:“真的” }

【问题讨论】:

    标签: json jsonlint


    【解决方案1】:

    您的 JSON 结构无效。有两个根元素,根据您的 JSON 结构,这似乎应该是一个集合。将您的 JSON 结构包装在 [] 中以使其成为一个集合。

    [
       {
          "liked":"true",
          "user_id":"101",
          "video_end_type":"3",
          "minutes_played":"3",
          "video_id":"101",
          "geo_cd":"AP",
          "channel_id":"11",
          "creator_id":"101",
          "timestamp":"07/05/2019 01:36:35",
          "disliked":"true"
       },
       {
          "liked":"true",
          "user_id":"102",
          "video_end_type":"null",
          "minutes_played":"4",
          "video_id":"102",
          "geo_cd":"AP",
          "channel_id":"12",
          "creator_id":"102",
          "timestamp":"15/04/2019 17:04:00",
          "disliked":"true"
       }
    ]
    

    【讨论】:

      猜你喜欢
      • 2022-10-23
      • 1970-01-01
      • 2018-07-21
      • 1970-01-01
      • 1970-01-01
      • 2020-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多