Convert TOML to MSGPACK

Turn TOML 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 TOML files on the dialor turn it to pick what to do

TOML config as compact MessagePack.The structure and key order stay. Dates become text and comments go.

  1. What you get

    One MessagePack file with the same structure as your TOML file. Keys stay in the same order, and tables and lists become maps and lists.

    Integers, floats, booleans, null and text keep their types, so a number in TOML is still a number in the MessagePack file.

  2. What changes

    MessagePack has no date type in this conversion, so dates and times become ISO 8601 text. A program reading the file gets a string where TOML had a date.

    Comments are dropped. They are not part of the data, so they have no place in the output.

  3. When it fails

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

    To go the other way, use MSGPACK to TOML.

TOML and MSGPACK.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 · 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 TOML to MSGPACK conversion through the API, for your app or your agent.

terminal
$ cv convert report.toml report.msgpack
$ cv convert report.toml report.msgpack

Questions.What people ask about TOML to MSGPACK.

01OF 04

Yes. The keys come out in the same order as in the TOML file.

They become ISO 8601 text. The value is stored as a string, not as a date type.

No. Comments are dropped.

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

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