【发布时间】:2022-01-10 21:02:26
【问题描述】:
我正在尝试在 jupyter notebook 中打印 JSON 数据,但我得到了jsondecodeerror。
代码
import json
people_string ='''
{
"people":[
"name":"John Smith",
"phone":"615-555-7164",
"emails":["johnsmith@boguseemail.com","john.smith@work-place.com"],
"has_license":false
},
{
"name":"Jane Doe",
"phone":"560-555-5153",
"emails":null,
"has_license":true
}
]
}
data=json.loads(people_string)
print(data)
【问题讨论】: