Questions on Export features

Ervs Sevilla shared this question 4 years ago
Need Answer

I'm not sure why the export to "JSON" file contains "BINARY" data format for the _id and

exporting to "SQL" file contains GUID string for the _id.

See, the reason for exporting these datasets from MongoDB is to use it somewhere else correct?

So, exporting to JSON file should have the _id as GUID or at least provide an option there.



Replies (2)


If you choose export as "mongoexport json (*.json)" , it will format LUUID as {"$binary":"xxxxxxxxxxxxxxxxxx==","$type":"03"} to follow MongoDB Specification.

To properly parse and import to MongoDB, the "mongoexport" JSON format needs to retain type information. If the UUID is formatted as a simple UUID string, when you import the JSON file into MongoDB, it becomes a string instead of a real UUID value.


Thank you for your response. I appreciate it!

Maybe in the near future, you guys will provide an option to export collections to JSON file with UUID string.

I was playing with MS SQL's JSON import where I have a JSON file and import it - straight up to SQL Server with no data conversions.

Leave a Comment
Attach a file