我有一个json文件,数据如下:{
"id": 1008,
"description": "Cheese, caraway",
"tags": [ ],
"manufacturer": "",
"group": "Dairy and Egg Products",
"portions": [
{
"amount": 1,
"unit": "oz",
"grams": 28.35
}
],
"nutrients": [
{
"value": 25.18,
"units": "g",
"description": "Protein",
"group": "Composition"
},
{
"value": 29.2,
"units": "g",
"description": "Total lipid (fat)",
"group": "Composition"
},
{
"value": 3.06,
"units": "g",
"description": "Carbohydrate, by difference",
"group": "Composition"
},
{
"value": 3.28,
"units": "g",
"description": "Ash",
"group": "Other"
}
]
}
我用下面的代码试着从中读出
^{pr2}$
但得到以下错误:records = json.loads(data)
ValueError: Expecting value: line 1 column 1 (char 0)
有什么问题吗?我注意到从“data”返回的结果以“锘縶”开头,这是可能的原因吗?如果是,如何解决?在