Synopsis
bsondump converts BSON files into human-readable
formats, including JSON. For example, bsondump is useful
for reading the output files generated by mongodump.
Important
bsondump is a diagnostic tool for inspecting
BSON files, not a tool for data ingestion or other application use.
bsondump uses Extended JSON v2.0
(Canonical mode)
to format its data.
Run bsondump from the system command line, not the
mongo shell.
Options
- --verbose, -v
- Increases the amount of internal reporting returned on standard output or in log files. Increase the verbosity with the - -vform by including the option multiple times, (e.g.- -vvvvv.)
- --quiet
- Runs - bsondumpin a quiet mode that attempts to limit the amount of output.- This option suppresses: - output from database commands 
- replication activity 
- connection accepted events 
- connection closed events 
 
- --objcheck
- Validates each BSON object before outputting it in JSON format. By default, - bsondumpenables- --objcheck <bsondump --objcheck>. For objects with a high degree of sub-document nesting,- --objcheck <bsondump --objcheck>can have a small impact on performance.
- --type=<json|debug>
- Changes the operation of - bsondumpfrom outputting JSON (the default) to a debugging format.
- --bsonFile
- Specifies the path to a BSON file to dump to JSON. - --bsonFileis an alternative to the positional- \<bsonFilename\>option.- By default, - bsondumpreads from standard input.
- <bsonFilename>
- The final argument to - bsondumpis a document containing BSON. This data is typically generated by- bsondumpor by MongoDB in a rollback operation.