我在用JSONLint http://jsonlint.com/解析一些 JSON,我不断收到错误:
错误:第 1 行解析错误:
[{“ 产品”: [{”
---^
需要“STRING”、“}”,却得到“未定义”
这是代码:
[
{
“product” : [ { “code” : “Abc123”, “description” : “Saw blade”, “price” : 34.95 } ],
“vendor” : [ { “name” : “Acme Hardware”, “state” : “New Jersey” } ]
},
{
“product” : [ { “code” : “Def456”, “description” : “Hammer”, “price” : 22.51 } ],
},
{
“product” : [ { “code” : “Ghi789”, “description” : “Wrench”, “price” : 12.15 } ],
“vendor” : [ { “name” : “Acme Hardware”, “state” : “New Jersey” } ]
},
{
“product” : [ { “code” : “Jkl012”, “description” : “Pliers”, “price” : 14.54 } ],
“vendor” : [ { “name” : “Norwegian Tool Suppliers”, “state” : “Kentucky” } ]
}
]
JSON 字符串文字必须使用普通引号字符 ("
),不是智能引号 (“”
).
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)