NDJSON (Newline Delimited JSON) is a format where each line is a valid JSON object, making it easier to process large datasets sequentially.
Technical Details
Each line in an NDJSON file is a complete, self-contained JSON object ended by a newline character. This allows for streaming processing without loading the entire file into memory.
Advantages
- Streaming-friendly for large datasets
- Easy to append new records
- Each record can be processed independently
- Simpler to parse than JSON arrays for large datasets
Limitations
- No support for cross-record references
- Less widely supported than standard JSON
- Each line must be a complete JSON object
- Not suitable for deeply nested relationships