MongoDB Compass : Trouble reading JSON file

I am trying to import a JSON file onto my MongoDB collection. The file has UTF-8 encoding, appears to have solid syntax and more importantly, has no issues being imported via Studio 3T. But when I try doing that on MongoDB Compass, I get the following error: Parser cannot parse input: expected a value… Any help would be appreciated. Cheers!

The fact that Studio 3T does not complain does not mean that the file is correct.

Try to open the file with firefox, its parser it quite strict and error messages are usually useful.

The jq utility might also be useful.

If the above fails you may share the file with us.

If you created the data using 3T export mechanism, you should be aware that it doesnt produce the correct json format but if you try to import that file, again using 3T, then you will have no problem. however, if you try to import it using Compass or any other gui to manage compass, you will most likely get the error you’re encountering right now. because the exported json file using 3T doesnt produce the correct format for json.