Convert CBOR to TOML

Turn CBOR files into TOML. The same keys and values as TOML, with plain values written before tables, and a top-level list is written under the key items, as [[items]] tables when its entries are objects.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

CBOR data as a TOML file.Keys and values carry over. Plain values come first, then tables.

  1. What you get

    One TOML file with the same keys and values as the CBOR. Plain values are written before tables, as TOML expects.

    A top-level list is written under the key items. When its entries are objects, they come out as [[items]] tables.

  2. What changes

    Byte strings become base64 text. Epoch times become ISO 8601 text.

    A null in an object is dropped, and the conversion gives a warning. TOML cannot hold a null.

  3. When it stops

    A null inside a list fails the conversion, since TOML cannot hold it. An integer beyond the signed 64-bit range fails for the same reason.

    The conversion stops with input_corrupted when the file could not be parsed. It stops with unsupported_elements when the file holds something TOML cannot carry.

    To go the other way, use TOML to CBOR.

CBOR and TOML.What each format is.

The formats

From · CBOR

CBOR

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

Extensions
.cbor
MIME type
application/cbor
Kind
Text and data
To · TOML

TOML

TOML configuration files, the format of Cargo and pyproject.

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

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

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

Questions.What people ask about CBOR to TOML.

01OF 04

A null in an object is dropped with a warning. A null inside a list fails the conversion.

They become base64 text in the TOML file.

The list is written under the key items. If its entries are objects, each one becomes an [[items]] table.

The file holds something TOML cannot carry. A null inside a list and an integer beyond the signed 64-bit range are two such cases.

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