bson / json / converter

bson / json / converter

  • Written by
    Walter Doekes
  • Published on

A simple script to convert BSON data to JSON data: bson2json.py (view)

Example usage:

$ bson2json.py /var/backups/mongodb/all-dbs.mon/graylog2/streams.bson --pretty
[
    {
        "_id": "506ed227dc1d710c0700000e",
        "additional_columns": [],
        "alarm_active": true,
        "alarm_callbacks": [
            "org.graylog2.emailalarmcallback.callback.EmailAlarmCallback",
            "org.graylog2.execalarmcallback.callback.ExecAlarmCallback"
        ],
        "alarm_limit": 80,
        "alarm_period": 5,
        "alarm_timespan": 5,
        "created_at": "2012-10-05T12:27:19Z",
...

Back to overview Newer post: python parsestring / silently skips entities Older post: thunderbird / reply / only selected text