Kenil Vasani 646 Questions 567 Answers 77 Best Answers 26 Points View Profile 4 Kenil Vasani Asked: December 14, 20202020-12-14T21:02:56+00:00 2020-12-14T21:02:56+00:00In: Python json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) 4 1 Answer Voted Kenil Vasani 646 Questions 567 Answers 77 Best Answers 26 Points View Profile Best Answer Kenil Vasani 2020-12-14T21:02:23+00:00Added an answer on December 14, 2020 at 9:02 pm You have two records in your json file, and json.loads() is not able to decode more than one. You need to do it record by record. See Python json.loads shows ValueError: Extra data OR you need to reformat your json to contain an array: { "foo" : [ {"name": "XYZ", "address": "54.7168,94.0215", "country_of_residence": "PQR", "countries": "LMN;PQRST", "date": "28-AUG-2008", "type": null}, {"name": "OLMS", "address": null, "country_of_residence": null, "countries": "Not identified;No", "date": "23-FEB-2017", "type": null} ] } would be acceptable again. But there cannot be several top level objects. 7 Share Share Share on Facebook Share on Twitter Share on LinkedIn Share on WhatsApp You must login to add an answer. Username or email* Password* Remember Me! Forgot Password? Explore Most Answered Most Visited Most Voted Random
Kenil Vasani
You have two records in your json file, and
json.loads()
is not able to decode more than one. You need to do it record by record.See Python json.loads shows ValueError: Extra data
OR you need to reformat your json to contain an array:
would be acceptable again. But there cannot be several top level objects.