When to Use jq's --stream Option for Large JSON Processing

Use jq --stream when processing JSON files too large to fit in memory, when extracting specific values from massive documents without loading the entire structure, or when handling line-delimited JSON streams incrementally.

The jq command-line JSON processor normally materializes the entire input document into an in-memory tree before applying filters. According to the jqlang/jq source code, the --stream flag switches the parser into incremental mode, yielding path-value pairs that enable O(depth) memory usage rather than O(size).

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →