3
我與正在發送這樣的JSON響應的API時:JSON包含減號(「 - 」)char:這是有效/標準嗎?
[
- {
"id": 46843639,
"nickname": "JSON",
"registration_date": "2004-03-07T23:16:20.000-04:00",
"country_id": "BR",
"user_type": "normal",
"logo": null,
"points": 91,
"site_id": "JSN",
"permalink": "http://xxxxxx",
"seller_reputation": - {
"level_id": "2_orange",
"power_seller_status": null,
"transactions": - {
"period": "historic",
"total": 14,
"completed": 8,
"canceled": 6,
"ratings": - {
"positive": 1,
"negative": 0,
"neutral": 0,
},
},
},
"status": - {
"site_status": "active",
},
},
]
我找不到那個負「 - 」符號在任何規範文檔。這是JSON標準嗎?
還有最後一個捲曲的右大括號後面的逗號? – John 2012-04-13 21:22:32
是的,它從網站本身提取,確實非常奇怪。聽起來像我必須編寫我自己的自定義解析器爲此,偉大的... :( – ruhalde 2012-04-13 21:26:48
Pfft。看起來像服務是刮一些其他工具的JSON顯示輸出;這些「 - 」可能是可以在工具中點擊,並且摺疊結構 – 2012-04-13 21:28:57