Convert JSONL to TOML

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

JSON Lines turned into one TOML file.Your keys and values carry over. The list of lines is written under the key items.

  1. What you get

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

    A JSONL file is a list of objects, one per line. TOML has no such top-level list, so the list is written under the key items. When the entries are objects, each one becomes an [[items]] table.

  2. What changes

    A null inside an object is dropped, and the conversion gives a warning. TOML has no null, so the key is left out of that table.

  3. When it fails

    A null inside a list stops the conversion, because TOML cannot hold it there. An integer beyond the signed 64-bit range also stops it, since TOML cannot store a number that large.

    To go the other way, use TOML to JSONL.

JSONL and TOML.What each format is.

The formats

From · JSONL

JSON Lines

JSON Lines, one JSON object per line, the format of logs and datasets.

Extensions
.jsonl .ndjson
MIME type
application/jsonl
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 JSONL to TOML conversion through the API, for your app or your agent.

terminal
$ cv convert report.jsonl report.toml
$ cv convert report.jsonl report.toml

Questions.What people ask about JSONL to TOML.

01OF 04

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

A null in an object is dropped, with a warning. A null inside a list makes the conversion fail.

An integer beyond the signed 64-bit range cannot be held in TOML. The conversion fails instead of changing the number.

You get one TOML file for the JSONL you convert.

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