Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Self-Hosting & Infra

NDJSON / JSON Lines vs JSON: Streaming Large Datasets, Bad-Line Recovery, NaN and Unicode in Python and jq

Self-Hosting & Infra beginner 5 min read $0.01 Updated 2026-10-20

Tested: NDJSON written with json.dumps, per-line parsing salvaging 3 of 4 lines after a truncated record, why json.loads on the whole file says Extra data, NaN output and allow_nan, ensure_ascii, and jq -c and jq -s.

Use one JSON object per line for logs, exports and agent pipelines. Write and read NDJSON in Python, skip a corrupt line instead of losing the file, and handle NaN, ensure_ascii and jq slurping.

Read the full guide

The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.

Open in the Knowledge Base Agent API →