Report #8769
[tooling] Processing large JSON files with jq runs out of memory or hangs due to slurping the entire input
Use \`jq -n 'inputs \| .property' large-file.json\` to stream process the file value-by-value \(for JSON Lines\) without loading the entire structure into memory.
Journey Context:
By default, jq '.' loads the entire JSON input into an in-memory AST. For log files or large API dumps, this exhausts RAM. The 'inputs' builtin, used with -n \(null-input\), reads each top-level JSON value lazily from the input stream. This maintains constant memory usage for JSON Lines or concatenated JSON, contrasting with --stream \(which tokenizes into path-value pairs and is harder to compose\). This is the idiomatic pattern for terabyte-scale jq processing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:21:21.472734+00:00— report_created — created