[英]JSON invalid character '}' looking for beginning of object key string
I am attempting to import a .json
file to parse.com
, and I have encountered many errors while doing so. 我试图导入
.json
文件parse.com
,虽然这样做我也遇到了很多的错误。 I solved them sequentially, but after I click finish import
, I get the error 我按顺序解决了它们,但是在我点击
finish import
,我收到错误
invalid character '}' looking for beginning of object key string
My JSON
script is, as far as I know, perfectly fine. 据我所知,我的
JSON
脚本非常好。 But I only started using JSON
two hours ago, so I'm sure there's something wrong with it. 但我两小时前才开始使用
JSON
,所以我确定它有问题。
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah",
}]
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam",
}]
}]
}
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
将数据导入parse.com
Correct your JSON syntax: 更正您的JSON语法:
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah"
}],
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam"
}]
}]
}
Observe that I have added ,
after each array.. and removed ,
after name2
key. 观察到,我已经加入
,
每个阵列..后除去,
之后name2
键。
Always use validators such as http://jsonlint.com/ to validate your JSON. 始终使用http://jsonlint.com/等验证程序来验证您的JSON。
Use any JSON validator like http://jsonlint.com/ to validate your JSON. 使用任何JSON验证器(如http://jsonlint.com/)来验证您的JSON。
Correct JSON is: 正确的JSON是:
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah"
}],
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam"
}]
}]
}
You need to remove the comma's after name2
and then insert a comma between nameChunk1
and nameChunk2
. 您需要删除
name2
之后的逗号,然后在nameChunk1
和nameChunk2
之间插入逗号。 Valid JSON below: 以下有效JSON:
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah"
}],
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam"
}]
}]
}
There are two issues with the JSON: JSON有两个问题:
Below is the valid JSON: 以下是有效的JSON:
{
"results": [{
"nameChunk1": [{
"name1": "Sean",
"name2": "Noah"
}],
"nameChunk2": [{
"name1": "Joseph",
"name2": "Sam"
}]
}]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.