Convert TOML to BSON

Turn TOML files into BSON. One BSON document with the same keys in order; a top-level list is wrapped under the key items and any other value under value.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

A BSON document with your TOML keys in order.Integers, floats, booleans, text and nested tables keep their types.

  1. What you get

    One BSON file with the same keys in the same order as the TOML. Integers, floats, booleans, null, text, nested objects and lists keep their types.

    A top-level list is wrapped under the key items. Any other top-level value is wrapped under the key value.

  2. What changes

    TOML dates and times become ISO 8601 text, so they stay text in the BSON file and are not stored as BSON dates.

    Integers beyond the signed 64-bit range become floats.

  3. What it leaves behind

    Comments are dropped. Only the keys and values are written to the BSON file.

    If you need the data back as TOML, BSON to TOML converts it the other way.

TOML and BSON.What each format is.

The formats

From · TOML

TOML

TOML configuration files, the format of Cargo and pyproject.

Extensions
.toml
MIME type
application/toml
Kind
Text and data
To · BSON

BSON

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

Extensions
.bson
MIME type
application/bson
Kind
Text and data

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

terminal
$ cv convert report.toml report.bson
$ cv convert report.toml report.bson

Questions.What people ask about TOML to BSON.

01OF 04

No. Dates and times become ISO 8601 text, and they stay text in the BSON file.

No. Comments are dropped from the output.

Integers beyond the signed 64-bit range become floats. Other integers keep their type.

The conversion stops with input_corrupted when the file could not be parsed.

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