Convert BSON to JSONL

Turn BSON files into JSONL. Each entry of a top-level list becomes one line of compact JSON, and any other value becomes a single line, with values and key order kept.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

BSON as one JSON object per line.A top-level list becomes one line per entry. Any other value becomes a single line.

  1. What you get

    One JSONL file. If the BSON holds a top-level list, each entry of the list becomes one line of compact JSON. Any other value becomes a single line.

    Values and key order are kept as they are in the BSON.

  2. How special values change

    BSON has types that JSON does not. ObjectIds become hex text. Dates become ISO 8601 text. Binary data becomes base64.

  3. When it stops

    If the file cannot be parsed, the conversion stops with input_corrupted. To go the other way, use JSONL to BSON.

BSON and JSONL.What each format is.

The formats

From · BSON

BSON

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

Extensions
.bson
MIME type
application/bson
Kind
Text and data
To · 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

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

terminal
$ cv convert report.bson report.jsonl
$ cv convert report.bson report.jsonl

Questions.What people ask about BSON to JSONL.

01OF 04

Each entry of a top-level list becomes one line. Any other value becomes a single line.

They become hex text.

Dates become ISO 8601 text.

Binary data becomes base64.

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