Saltar al contenido
uencoder

Especificación NDJSON (Newline Delimited JSON)

NDJSON represents un stream de JSON objetos separated por newlines, para efficient línea-por-línea 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
{"a":1}\n{"b":2}
newline sep
Lines separated by \n
no commas
streaming
Process line by line
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
one event per line
BigQuery
Export format
streaming load
ES bulk
Elasticsearch API
action/data pairs

Herramientas relacionadas

参考链接