相关疑难解决方法(0)

将json文件插入mongodb

我是mongodb的新手.在Windows中安装mongodb后,我尝试使用以下命令插入一个简单的json文件:

C:\>mongodb\bin\mongoimport --db test --collection docs < example2.json
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

connected to: 127.0.0.1
Fri Oct 18 09:05:43.749 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Field name expected: offset:43
Fri Oct 18 09:05:43.750
Fri Oct 18 09:05:43.750 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Expecting '{': offset:0
Fri Oct 18 09:05:43.751
Fri Oct 18 09:05:43.751 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Field name expected: offset:42
Fri Oct 18 09:05:43.751 …
Run Code Online (Sandbox Code Playgroud)

mongodb

66
推荐指数
6
解决办法
10万
查看次数

标签 统计

mongodb ×1