Spécification NDJSON (Newline Delimited JSON)
NDJSON represents un stream de JSON objets separated par newlines, pour efficient ligne-par-ligne processing.
Format Rules
Each line contains exactly one valid JSON value, typically an object. Lines are separated by newline characters (\n). Empty lines may be skipped or forbidden depending on the implementation. The format enables streaming and append-only logs. NDJSON is not wrapped in a JSON array, avoiding the need to parse the entire file at once.
- one per line
- Single JSON value per line
- newline sep
- Lines separated by \n
- streaming
- Process line by line
{"a":1}\n{"b":2} no commas append-only Use Cases
NDJSON is widely used for log files, database exports, and big data pipelines. Each line can be processed independently, enabling parallel and streaming processing. The format is used by Elasticsearch bulk API, BigQuery exports, and many CLI tools. JSON Lines (JSONL) is an equivalent format with the same semantics. The simplicity makes it robust for large-scale data processing.
- logs
- Structured logging
- BigQuery
- Export format
- ES bulk
- Elasticsearch API
one event per line streaming load action/data pairs