Mycelgrid Guide

JSON vs JSON Lines vs NDJSON: What’s the Difference?

Standard JSON and line-oriented JSON use the same JSON syntax but package records differently. The distinction matters for parsing and interoperability.

Standard JSON is one JSON value

Standard JSON represents one complete JSON value. A large array containing many records is still one JSON value, even when pretty-printed across many physical lines.

JSON Lines is one value per line

JSON Lines uses one complete JSON value per line. That line-oriented shape works well for streaming, append-only files, and record-by-record processing.

Important: a blank line is not itself a JSON value under the general JSON Lines convention.

NDJSON usually names the same record pattern

NDJSON means newline-delimited JSON and commonly describes the same one-value-per-line structure. Ecosystems can differ in details, so document the actual interchange contract instead of relying only on the label.

Pretty-printed JSON is not JSON Lines

A multi-line object is still one standard JSON value. JSON Lines requires each record line to be independently parseable as a complete JSON value.

Tool tolerances are not format definitions

Mycelgrid Tool 004 skips blank physical lines in its JSON Lines / NDJSON mode, then parses each remaining line. That is a Mycelgrid tolerance, not a general redefinition of JSON Lines and not a promise about other parsers.

Choose by processing model

Use ordinary JSON for one structured document. Use a line-oriented form when independent records need to be appended, streamed, filtered, or processed one at a time.

Next step

Use Tool 004 when your next step is converting supported JSON or JSON Lines into a reviewable CSV