Lesson 8: Diagnostic Tools: bsondump / Learn
Code Summary: Diagnostic Tools: bsondump
Review the following code, which demonstrates how to use the bsondump tool.
The following code uses bsondump to output the documents in the accounts.bson file in a readable JSON format.
bsondump --pretty accounts.bson
The next example uses bsondump with the debug option to see the different data types and sizes of the objects represented in the documents in the accounts.bson file.
bsondump --type=debug accounts.bson
The following options can be used with the bsondump command. Check out the MongoDB documentation for more information.
--outFile
--pretty
--type