JSONL
JSONL (JSON Lines) is equivalent to NDJSON: one JSON object per line, an alternative name for the same format.
Purpose
To provide the standard format for streaming JSON processing, synonymous with NDJSON.
Mechanism
Each line is a valid JSON value separated by \n. The only difference from NDJSON is that JSONL emphasizes one object per line (not arrays/scalars), but in practice the names are used interchangeably.
Use cases
- Log files
- Data pipeline streams
- Paginated API responses
- Database dumps
Examples
- Input
{"id":1} {"id":2}OutputTwo JSON objects, one per lineSame as NDJSON
Common errors
- Confusing JSONL with a JSON array
- JSONL has no outer []; each line is independent
Related terms
NDJSON
NDJSON (newline-delimited JSON) puts one independent JSON object per line, suiting streaming processing of large datasets. GLOSSARY
JSON
JSON (JavaScript Object Notation) is a lightweight data interchange format based on JavaScript object literals, using key-value pairs and arrays. GLOSSARY
CSV
CSV (comma-separated values) is a tabular data format that separates fields with commas; RFC 4180 defines the standard, and it is widely used for data import and export. GLOSSARY