Fügen Sie die JSON-Datei in mongodb ein

Ich bin neu in Mongodb. Nach der Installation von Mongodb in Windows versuche ich, eine einfache JSON-Datei mit dem folgenden Befehl einzufügen:

C:\>mongodb\bin\mongoimport --db test --collection docs < example2.json

Ich erhalte den folgenden Fehler:

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
Fri Oct 18 09:05:43.751 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.752 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Field name expected: offset:44
Fri Oct 18 09:05:43.752
Fri Oct 18 09:05:43.752 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Expecting '{': offset:0
Fri Oct 18 09:05:43.752
Fri Oct 18 09:05:43.752 check 0 0
Fri Oct 18 09:05:43.752 imported 0 objects
Fri Oct 18 09:05:43.752 ERROR: encountered 6 error(s)s
example2.file
{"FirstName": "Bruce", "LastName": "Wayne", 
"Email": "[email protected]"}
{"FirstName": "Lucius", "LastName": "Fox", 
"Email": "[email protected]"}
{"FirstName": "Dick", "LastName": "Grayson", 
"Email": "[email protected]"}

Was muss ich tun, um eine neue JSON-Datei in Mongodb zu importieren?

Antworten auf die Frage(8)

Ihre Antwort auf die Frage