更新时间:2022-12-18 11:16:50
bsondump将BSON文件转换为人类可读的格式, 包括JSON.例如,bsondump可用于读取输出 mongodump生成的文件.
bsondump converts BSON files into human-readable formats, including JSON. For example, bsondump is useful for reading the output files generated by mongodump.
来源: https://docs.mongodb.com/manual/reference/program/bsondump
示例
bsondump --outFile collection.json collection.bson
--pretty
选项以漂亮的打印格式JSON输出文档,例如:
The --pretty
option outputs documents in a pretty-printed format JSON, eg:
bsondump --pretty --outFile collection.json collection.bson