Convert BSON to MSGPACK

Turn BSON files into MessagePack. The same structure and key order in MessagePack, with integers, floats, booleans, null, text, lists and maps keeping their types and dates as text.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop BSON files on the dialor turn it to pick what to do

BSON data in a compact MessagePack file.Structure and key order stay the same. Dates, ObjectIds and binary data become text.

  1. What you get

    One MessagePack file with the same structure as the BSON document. Keys stay in their original order, and maps and lists keep their nesting.

    Integers, floats, booleans, null, text, lists and maps keep their types.

  2. What becomes text

    Three BSON types change. ObjectIds become hex text. Dates become ISO 8601 text. Binary data becomes base64 text.

    Dates are not stored as a date type in the MessagePack file. They are text, so a program reading the file gets a string where the BSON had a date.

  3. Going the other way

    To convert back, use MSGPACK to BSON. The pages for every BSON conversion list the other formats BSON can become.

BSON and MSGPACK.What each format is.

The formats

From · BSON

BSON

MongoDB's binary document encoding, JSON with dates and binary fields.

Extensions
.bson
MIME type
application/bson
Kind
Text and data
To · MSGPACK

MessagePack

Binary JSON: the same values as JSON in a compact byte encoding.

Extensions
.msgpack .mpk
MIME type
application/msgpack
Kind
Text and data

In your code.The same BSON to MSGPACK conversion through the API, for your app or your agent.

terminal
$ cv convert report.bson report.msgpack
$ cv convert report.bson report.msgpack

Questions.What people ask about BSON to MSGPACK.

01OF 04

Yes. The structure and key order stay the same as in the BSON file.

They become hex text in the MessagePack file.

As ISO 8601 text. They are not a date type in the output.

Binary data becomes base64 text.

More conversions.Other ways in and out of BSON and MSGPACK.