JSON无效字符'}'寻找对象密钥字符串的开头 [英] JSON invalid character '}' looking for beginning of object key string
问题描述
我正在尝试将.json
文件导入到parse.com
,并且这样做时遇到了很多错误.我按顺序解决了它们,但是单击finish import
后,出现错误
I am attempting to import a .json
file to parse.com
, and I have encountered many errors while doing so. I solved them sequentially, but after I click finish import
, I get the error
invalid character '}' looking for beginning of object key string
据我所知,我的JSON
脚本非常好.但是我只是两个小时前才开始使用JSON
,所以我确定它有问题.
My JSON
script is, as far as I know, perfectly fine. But I only started using JSON
two hours ago, so I'm sure there's something wrong with it.
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah",
}]
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam",
}]
}]
}
那么,神秘的无效}
在哪里?我担心有很多...请记住,我正在使用JSON
将数据导入到parse.com
So, where is the mysterious invalid }
? I fear there are many... Keep in mind I am using JSON
for importing data into parse.com
推荐答案
更正JSON语法:
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah"
}],
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam"
}]
}]
}
观察到我在每个数组之后添加了,
,并在name2
键之后删除了,
.
Observe that I have added ,
after each array.. and removed ,
after name2
key.
始终使用诸如 http://jsonlint.com/之类的验证器来验证JSON.
Always use validators such as http://jsonlint.com/ to validate your JSON.
这篇关于JSON无效字符'}'寻找对象密钥字符串的开头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!