MongoDB import error : Failed: error reading separator after document #1: bad JSON array format - found no opening bracket '[' in input source -


here json file :

{"a":"b"} 

when importing file in database command:

mongoimport --db test --collection abc --jsonarray --file abc.json 

i got error :

2016-11-10t15:03:39.696+0530    connected to: localhost 2016-11-10t15:03:39.697+0530    failed: error reading separator after document #1: bad json array format - found no opening bracket '[' in input source 2016-11-10t15:03:39.697+0530    imported 0 documents 

in console.

there no '[' symbol in file. can tell me wrong?

since included option --jsonarray, must provide array: [{"a":"b"}].

if provide single document, not use option --jsonarray.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -