MongoDB
 SQL >> Datenbank >  >> NoSQL >> MongoDB

BSON in menschenlesbares JSON konvertieren

Das Dienstprogramm bsondump kann BSON-Dateien in JSON umwandeln. Um die Ausgabe leichter lesbar zu machen, verwenden Sie die Option --pretty.

bsondump --outFile collection.json collection.bson

Formatierte Ausgabe:

bsondump --pretty --outFile collection.json collection.bson

Daten und andere BSON-Typen können je nach Tool-Version weiterhin in Extended-JSON-Form erscheinen.