我正在尝试将一些 json 数据导入 Mongo 并不断出错。我正在做这样的导入
mongoimport --stopOnError --db s --collection names < snow.json
它给我的错误是
Failure parsing JSON string near: ,
exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: ,
这是json数据。实际上有更多(大约 9 个)条目,但即使有两个条目,我也会收到错误消息。我从另一个可以导入的 json 文件中复制了这种格式。通过 json 验证器运行它说
Expecting 'EOF', '}', ',', ']'
在第一个条目的末尾,但它对我成功导入的文件也说了同样的话。你能告诉我有什么问题吗?
{ "firstname" : "Dave", "initial" : "M", "lastname" : "Smore", "firm" : "", "address" : "PO Box 479, Vancouver BC V1L 5R3",
"email" : "david@smore.ca", "phone" : "(250) 654-6840" , "fax" : "(456) 987-7370", "sex": "m"}
{ "firstname" : "Kerry", "initial" : "C", "lastname" : "Amber", "firm" : "K Amber Corporation",
"address" : "980 5th Ave, Snowbank, BC V2L 3H8", "email" : "kamber@gmail.com", "phone" : "604 622 6156" , "fax" : "604 662-4532", "sex": "f"}