小编SMS*_*SMS的帖子

json.decoder.JSONDecodeError:额外数据:第2行第1列(字符190)

我正在运行以下代码-

import json

addrsfile = 
open("C:\\Users\file.json", 
"r")
addrJson = json.loads(addrsfile.read())
addrsfile.close()
if addrJson:
    print("yes")
Run Code Online (Sandbox Code Playgroud)

但是给我以下错误-

import json

addrsfile = 
open("C:\\Users\file.json", 
"r")
addrJson = json.loads(addrsfile.read())
addrsfile.close()
if addrJson:
    print("yes")
Run Code Online (Sandbox Code Playgroud)

有人帮我吗?

JSON文件就像-

{"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}
Run Code Online (Sandbox Code Playgroud)

python json python-3.x

8
推荐指数
1
解决办法
4万
查看次数

标签 统计

json ×1

python ×1

python-3.x ×1