How jq's --stream Works: Inside the Streaming JSON Parser

The --stream option activates incremental parsing that emits [path, value] pairs immediately as leaf values are discovered, enabling jq to process massive JSON documents without loading them entirely into memory.

By default, jq parses complete JSON documents into memory before applying filters. The --stream option fundamentally changes this behavior, engaging a specialized parser implementation in src/jv_parse.c that tracks location via a dynamic path array and yields values piecemeal. This mode, controlled by the JV_PARSE_STREAMING flag set in src/main.c, allows pipelines to begin

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 →