What is NDJSON
NDJSON (a.k.a. JSON Lines) stores one JSON object per line, making it ideal for streaming, logs, and incremental processing.
Example
{"time":"2025-01-01T00:00:00Z","level":"info","msg":"started"} {"time":"2025-01-01T00:00:01Z","level":"info","msg":"ready"}
Benefits
- Stream-friendly and memory efficient
- Compatible with line-based tooling (grep, wc)
- Simplifies incremental processing