Meu arquivo está na pasta db que criamos na primeira aula, numa pasta chamada files.
Quando uso o comando
mongoimport --jsonArray --collection alunos --file <caminho do arquivo>.json
Eu recebo a seguinte mensagem:
D:\EstudoDeProgramacao\NodeJS\MongoDB\ProjetoAula\db>mongoimport --jsonArray --collection alunos --file D:\EstudoDeProgramacao\NodeJS\MongoDB\ProjetoAula\db\files\alunos.json
2019-09-12T19:09:31.621-0300 connected to: mongodb://localhost/
2019-09-12T19:09:31.668-0300 Failed: invalid JSON input
2019-09-12T19:09:31.668-0300 0 document(s) imported successfully. 0 document(s) failed to import.
Meu mongoimport version é o 4.2 e essa é a saida verbosa de segundo nível:
2019-09-12T19:21:54.598-0300 using write concern: &{majority false 0}
2019-09-12T19:21:54.644-0300 using 8 decoding workers
2019-09-12T19:21:54.644-0300 using 1 insert workers
2019-09-12T19:21:54.644-0300 will listen for SIGTERM, SIGINT, and SIGKILL
2019-09-12T19:21:55.251-0300 filesize: 1929 bytes
2019-09-12T19:21:55.251-0300 using fields:
2019-09-12T19:21:55.252-0300 connected to: mongodb://localhost/
2019-09-12T19:21:55.252-0300 ns: test.alunos
2019-09-12T19:21:55.252-0300 connected to node type: standalone
2019-09-12T19:21:55.252-0300 Failed: invalid JSON input
2019-09-12T19:21:55.252-0300 0 document(s) imported successfully. 0 document(s) failed to import.