json 行文件分析错误。期待 'EOF' 但它看起来很完美
json file Parse error on line . Expecting 'EOF' but it looks perfect
这是我的 json 文件:
{"_id":3,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Computers","slug":"Computers","description":"Computers","meta_description":"Computers","meta_keyword":"Computers","navigation":"true","top_id":3,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Computers","categoryids":"2,3","children":"yes","ebaycat":58058},
{"_id":4,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Home & Office","slug":"Home & Office","description":"Home & Office","meta_description":"Home & Office","meta_keyword":"Home & Office","navigation":"true","top_id":4,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Home & Office","categoryids":"2,4","children":"yes","ebaycat":0},
{"_id":5,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Entertainment","slug":"Entertainment","description":"Entertainment","meta_description":"Entertainment","meta_keyword":"Entertainment","navigation":"true","top_id":5,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Entertainment","categoryids":"2,5","children":"yes","ebaycat":550},
{"_id":6,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Motors","slug":"Motors","description":"Motors","meta_description":"Motors","meta_keyword":"Motors","navigation":"true","top_id":6,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Motors","categoryids":"2,6","children":"yes","ebaycat":0},
{"_id":7,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Fashion","slug":"Fashion","description":"Fashion","meta_description":"Fashion","meta_keyword":"Fashion","navigation":"true","top_id":7,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Fashion","categoryids":"2,7","children":"yes","ebaycat":3082},
{"_id":8,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Health","slug":"Health","description":"Health","meta_description":"Health","meta_keyword":"Health","navigation":"true","top_id":8,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Health","categoryids":"2,8","children":"yes","ebaycat":0},
{"_id":9,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Electronics","slug":"Electronics","description":"Electronics","meta_description":"Electronics","meta_keyword":"Electronics","navigation":"true","top_id":9,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Electronics","categoryids":"2,9","children":"yes","ebaycat":279},
使用 Jsonlint.com 我经常收到错误
Parse error on line 22: ... "ebaycat": 58058},{ "_id": 4,
----------------------^ Expecting 'EOF'
并将错误集中在该区域
},
{
类似的情况发生在我使用 MongoVue import json documents from file 功能时。
感谢任何帮助或对验证工具(具有修复功能)的参考。
您有几个对象,用 {...}
表示
这些对象应该在另一个对象或数组上。删除最后一个逗号 ,
并用 [ ]
覆盖整个内容以将其解析为对象数组。
编辑
刚看到MongoVUE
。然后简单地把所有没有逗号的文件像
{..}
{..}
并尝试
这是我的 json 文件:
{"_id":3,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Computers","slug":"Computers","description":"Computers","meta_description":"Computers","meta_keyword":"Computers","navigation":"true","top_id":3,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Computers","categoryids":"2,3","children":"yes","ebaycat":58058},
{"_id":4,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Home & Office","slug":"Home & Office","description":"Home & Office","meta_description":"Home & Office","meta_keyword":"Home & Office","navigation":"true","top_id":4,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Home & Office","categoryids":"2,4","children":"yes","ebaycat":0},
{"_id":5,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Entertainment","slug":"Entertainment","description":"Entertainment","meta_description":"Entertainment","meta_keyword":"Entertainment","navigation":"true","top_id":5,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Entertainment","categoryids":"2,5","children":"yes","ebaycat":550},
{"_id":6,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Motors","slug":"Motors","description":"Motors","meta_description":"Motors","meta_keyword":"Motors","navigation":"true","top_id":6,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Motors","categoryids":"2,6","children":"yes","ebaycat":0},
{"_id":7,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Fashion","slug":"Fashion","description":"Fashion","meta_description":"Fashion","meta_keyword":"Fashion","navigation":"true","top_id":7,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Fashion","categoryids":"2,7","children":"yes","ebaycat":3082},
{"_id":8,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Health","slug":"Health","description":"Health","meta_description":"Health","meta_keyword":"Health","navigation":"true","top_id":8,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Health","categoryids":"2,8","children":"yes","ebaycat":0},
{"_id":9,"date_created":"2016-01-01T00:00:00Z","date_updated":"2016-01-01T00:00:00Z","name":"Electronics","slug":"Electronics","description":"Electronics","meta_description":"Electronics","meta_keyword":"Electronics","navigation":"true","top_id":9,"top":"true","parent_id":2,"parent":"Default","active":"y","iscrawlable":"n","productype":"simple","path":"Electronics","categoryids":"2,9","children":"yes","ebaycat":279},
使用 Jsonlint.com 我经常收到错误
Parse error on line 22: ... "ebaycat": 58058},{ "_id": 4,
----------------------^ Expecting 'EOF'
并将错误集中在该区域
},
{
类似的情况发生在我使用 MongoVue import json documents from file 功能时。
感谢任何帮助或对验证工具(具有修复功能)的参考。
您有几个对象,用 {...}
表示
这些对象应该在另一个对象或数组上。删除最后一个逗号 ,
并用 [ ]
覆盖整个内容以将其解析为对象数组。
编辑
刚看到MongoVUE
。然后简单地把所有没有逗号的文件像
{..}
{..}
并尝试