我有一个JSON文件:https://gist.github.com/ty221/70f9d71e55ce9bc36bd5
我想用Jekyll装载它。不幸的是,但是JSONLint.com在我的代码中有语法错误。确切地说,在那里:
{
"name": "Nguyen Thi Thao Nguyen",
"website": "",
"interests": "- Learn more information about free and open software",
"org": " a:2:{i:0;s:48:\"- Vietnam National University - Ho Chi Minh City\";i:1;s:33:\"University of Economics and Law.\";} " //there is an error!!!
},错误是:
Parse error on line 420:
...re", "org": " a:2:{i:
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['我不知道是什么导致了这个错误。所有的东西都是反斜杠的,还有逗号等等。你能给我提点建议吗?
发布于 2015-01-15 15:03:39
在第420行中,有一个额外的制表符。删除它允许至少通过JSON验证JSON为有效的JSON。
我制作了一系列的截图来突出这个发现。

注意:正如@dystroy在注释中所说的,您可以用\t替换选项卡,而不是删除它。
发布于 2015-01-15 15:02:50
你在json结尾加了额外的逗号。并删除“//有错误!”从最后一行开始。以下是一个工作版本:
{
"name": "Nguyen Thi Thao Nguyen",
"website": "",
"interests": "- Learn more information about free and open software",
"org": " a:2:{i:0;s:48:\"- Vietnam National University - Ho Chi Minh City\";i:1;s:33:\"University of Economics and Law.\";}"
}https://stackoverflow.com/questions/27966088
复制相似问题