newline-delimited JSON
A streaming format in which every line is one complete JSON document, so each record can be parsed as soon as it arrives.
In more detail
Also called JSON Lines, it is common for structured logs, streaming responses and bulk data exports. Each line can be parsed on its own, so a file can be appended to and streamed without loading it all at once. If a stream breaks, every complete line received so far is still a valid record.
Examples
In the APIs course: The course service streams tasks with Content-Type: application/x-ndjson.{"id":1,"title":"Design"}
{"id":2,"title":"Build"}The course reads orders.jsonl with one json.loads call per line.siem_alerts.jsonl holds one alert per line.Related terms
- streaming — Sending a response in pieces as they become available instead of building the whole thing first.
- framing — The rule that marks where one message or record ends and the next begins in a stream of bytes.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- newline — The invisible character that ends a line of text, written \n in most programming languages.
- ReadableStream — A browser object that delivers data in chunks as it arrives, such as a fetch response.body, instead of all at once at the end.
- structured logging — Writing each log entry as named fields, such as status, duration and request identifier, instead of a free-text sentence.
Taught in
- Large Payloads And Streaming — Modern API Architecture: REST, GraphQL & gRPC
- Route Handlers: RESTful Endpoints with NextRequest — Next.js 15 & Modern App Router Architecture
- Streaming Endpoints: Server-Sent Events & NDJSON Feeds — Next.js 15 & Modern App Router Architecture
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Structured Logging And Why Text Fails — Full-Stack Observability: Metrics, Tracing & Logging
- Alert Triage, False Positive Reduction & Fatigue Mitigation — Security Operations & Threat Hunting (SOC)