Convert BSON to TSV

Turn BSON files into TSV. A list of objects becomes one row per object under a header of every key in first-seen order, and a single object becomes one row.

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 documents as rows in a table.Each object becomes one row, with one column for every key.

  1. What you get

    A TSV file with one row per object. A list of objects gives a header made of every key, in the order each key is first seen. A single object gives one row.

    The output is one file. Open it in any tool that reads tab-separated values.

  2. How values are written

    Nested objects and lists do not get their own columns. They are written into their cell as JSON text. A null leaves its cell empty.

    Cells that hold a tab, a quote or a line break are quoted, so the columns stay in place.

    BSON has types that TSV does not. ObjectIds become hex text, dates become ISO 8601 text, and binary data becomes base64 text.

  3. When it stops

    The conversion stops with input_corrupted when the BSON file could not be parsed. There are no options to set.

    To go the other way, use TSV to BSON.

BSON and TSV.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 · TSV

Tab-Separated Values

Tab-separated values.

Extensions
.tsv .tab
MIME type
text/tab-separated-values
Kind
Text and data

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

terminal
$ cv convert report.bson report.tsv
$ cv convert report.bson report.tsv

Questions.What people ask about BSON to TSV.

01OF 04

The header holds every key found in the objects, in the order each key is first seen.

They are written into their cell as JSON text.

Dates are written as ISO 8601 text. ObjectIds are written as hex text.

The BSON file could not be parsed, so the conversion stops.

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