mongoimport should assume json with arrays
When running something like "mongoimport --host Cluster0-shard-0/cluster0-shard-00-00-MY.mongodb.net:27017,cluster0-shard-00-01-MY.mongodb.net:27017,cluster0-shard-00-02-MY.mongodb.net:27017 --ssl --username MYUSER --password MYPASS --authenticationDatabase admin --db db --collection coll --type json --file D:\downloads\records.json". You get error "2019-09-28T15:40:34.076-0600 Failed: cannot decode array into a D". You have to use the "--jsonArray". Why wouldn't this be the default. Almost all JSON objects have arrays via mass import/export. Worse case, it should give a better error message.
1
vote
![](https://secure.gravatar.com/avatar/3acf83ad34ce7ad329c517e8a9719183?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)