Mongodb import json file reported the following error, help solve?

Mar.12,2021

there are several possibilities for this kind of problem:

  1. Encoding problem. Mongoimport supports utf-8 encoding. Please convert the encoding before importing.
  2. There is a real problem with the
  3. JSON format. Open it with a text editor and take a look at it.

since none of your documents have been imported, I tend to think it is 1. Check it out for yourself.


according to issues , you need to add -- jsonArray

.

you can also take a look at from-file-into-mongodb-using-mongoimport" rel=" nofollow noreferrer "> importing-json-from-file-into-mongodb-using-mongoimport

.
Menu