Convert TOML to CBOR

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

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

Your TOML config as compact binary CBOR.Same structure and key order, with each value keeping its type.

  1. What you get

    One CBOR file with the same structure and key order as your TOML. Integers, floats, booleans, null, text, arrays and maps keep their types.

    CBOR is a binary format, so the output is not readable as text the way the TOML was.

  2. What changes

    Dates and times become ISO 8601 text. They are stored as strings, not as a date type, so any program that reads the CBOR gets text for them.

    Comments are dropped. CBOR has no place for them, so only the data is kept.

  3. When it stops

    If the file cannot be parsed, the conversion stops with input_corrupted. No CBOR file is produced in that case.

    To go the other way, use CBOR to TOML.

TOML and CBOR.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 · CBOR

CBOR

Concise Binary Object Representation, the binary JSON of IoT and web standards.

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

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

terminal
$ cv convert report.toml report.cbor
$ cv convert report.toml report.cbor

Questions.What people ask about TOML to CBOR.

01OF 04

Yes. Keys come out in the same order as in the TOML file.

No. Dates and times become ISO 8601 text.

No. Comments are dropped, and only the data is converted.

The file could not be parsed. The conversion stops and gives no CBOR output.

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