我試圖從提取整數值「計數」每個鍵下面和我惹麻煩用繩子指標的誤差。有人可以提供這樣做的方法從JSON整數?提取使用Python 2.7
"comments":[
{
"name":"Courtneylee",
"count":97
},
{
"name":"Geraldine",
"count":96
},
{
"name":"Aisling",
"count":96
},
{
"name":"Millar",
"count":93
},
{
"name":"Aeryn",
"count":92
},
{
"name":"Emilylee",
"count":92
},
{
"name":"Clodagh",
"count":92
},
{
"name":"Madelaine",
"count":91
},
{
"name":"Amyrose",
"count":89
},
{
"name":"Kael",
"count":85
},
{
"name":"Ngonidzashe",
"count":83
},
{
"name":"Zayn",
"count":83
},
{
"name":"Jordy",
"count":80
},
{
"name":"Tyane",
"count":78
},
{
"name":"Hussnan",
"count":78
},
{
"name":"Karly",
"count":70
},
{
"name":"Matej",
"count":70
},
{
"name":"Reena",
"count":68
},
{
"name":"Abigayle",
"count":68
},
{
"name":"Karamvir",
"count":67
},
{
"name":"Kaleigh",
"count":66
},
{
"name":"Roba",
"count":65
},
{
"name":"Harjyot",
"count":65
},
{
"name":"Attila",
"count":64
},
{
"name":"Dharam",
"count":62
},
{
"name":"Marcin",
"count":56
},
{
"name":"Ruaidhri",
"count":56
},
{
"name":"Adenn",
"count":51
},
{
"name":"Saschamarie",
"count":50
},
{
"name":"Rylie",
"count":49
},
{
"name":"Alieu",
"count":48
},
{
"name":"Caidy",
"count":43
},
{
"name":"Kaila",
"count":40
},
{
"name":"Declain",
"count":39
},
{
"name":"Owyn",
"count":37
},
{
"name":"Gurthar",
"count":35
},
{
"name":"Brandon",
"count":33
},
{
"name":"Mustafa",
"count":32
},
{
"name":"Dion",
"count":31
},
{
"name":"Meenal",
"count":22
},
{
"name":"Kyan",
"count":20
},
{
"name":"Karis",
"count":18
},
{
"name":"Christabel",
"count":12
},
{
"name":"Kerryanne",
"count":12
},
{
"name":"Martha",
"count":10
},
{
"name":"Helena",
"count":9
},
{
"name":"Rumaysa",
"count":7
},
{
"name":"Rosalind",
"count":5
},
{
"name":"Florin",
"count":4
},
{
"name":"Melisa",
"count":3
}
]
}
你能提供您所使用的代碼和追蹤? – glibdud
的JSON是無效的。 – MCSH