简体   繁体   中英

I am trying to Process a json file but while checking from JsonLint I get error Expecting 'EOF', got ','

Error: Parse error on line 12: ..."disliked": "true"}, { "liked": "true" ----------------------^ Expecting 'EOF', got ','

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" }

You have an invalid JSON structure. There are two root elements and based on your JSON structure it appears that this is supposed to be a collection. Wrap your JSON structure in [] to make it a collection.

[
   {
      "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"
   }
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM