I am running the following code-
import json
addrsfile =
open("C:\\Users\file.json",
"r")
addrJson = json.loads(addrsfile.read())
addrsfile.close()
if addrJson:
print("yes")
But giving me following error-
Traceback (most recent call last):
File "C:/Users/Mayur/Documents/WebPython/Python_WebServices/test.py", line 9, in <module>
addrJson = json.loads(addrsfile.read())
File "C:\Users\Mayur\Anaconda3\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\Mayur\Anaconda3\lib\json\decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190)
Anyone help me please?
JSON file is like-
{"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}