Convert BSON to PROPERTIES

Turn BSON files into PROPERTIES. Each value becomes one key=value line with Java escapes, under its path of keys joined with dots and list positions in brackets, such as server.hosts[0], and a top-level list is written under items, such as items[0].name.

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 documents as flat key=value lines.Every value gets its own line, named by its path of keys.

  1. What you get

    One PROPERTIES file. Each value in the BSON document becomes one key=value line, with Java escapes applied to the text.

    The key is the path to the value, with keys joined by dots. List positions go in brackets, so a host list inside a server object gives keys such as server.hosts[0].

  2. How structure is written

    A top-level list has no key to sit under, so it is written under items. The name of the first entry in such a list becomes items[0].name.

    An empty object or an empty list is written as JSON text on its value line.

  3. How special values appear

    BSON holds types that PROPERTIES has no place for, so they become text. ObjectIds become hex text. Dates become ISO 8601 text. Binary data becomes base64.

    To go the other way, use PROPERTIES to BSON.

BSON and PROPERTIES.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 · PROPERTIES

Java Properties

Key and value pairs in the Java properties format.

Extensions
.properties
MIME type
text/x-java-properties
Kind
Text and data

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

terminal
$ cv convert report.bson report.properties
$ cv convert report.bson report.properties

Questions.What people ask about BSON to PROPERTIES.

01OF 04

Keys are joined with dots, and list positions are put in brackets. An example is server.hosts[0].

It is written under items, so the name of the first entry becomes items[0].name.

ObjectIds are written as hex text and dates as ISO 8601 text. Binary data is written as base64.

You get one file.

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