JSON exploration CLI for flattening files, URLs, or stdin into greppable path assignments and rebuilding filtered results.
$brew install gron
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
gron flattens JSON into one assignment per path so you can inspect unfamiliar payloads with line-oriented tools like grep, diff, and sed. It can read files, URLs, or stdin, and it can rebuild filtered assignments back into valid JSON.
What It Enables
- Explore unfamiliar API responses or config blobs by surfacing the full path for matching keys and values.
- Filter, diff, or slice JSON with standard text tools, then reconstruct the kept assignments back into JSON with
--ungron. - Emit each path and value as a JSON stream row with
--json, or process newline-delimited JSON objects with--stream.
Agent Fit
- File, URL, and stdin inputs plus explicit exit codes make it easy to drop into shell inspection loops without interactive prompts.
--jsongives agents a structured[path, value]stream when the default assignment text would be awkward to parse.- Best suited to discovery and quick extraction; the project itself warns that grep and sed style mutation pipelines are error-prone for durable automation.
Caveats
- It is not a full query language like
jq; its main strength is path discovery and coarse filtering, not complex JSON transforms. - Default output is plain text assignments, so agents that need structured follow-up parsing should opt into
--jsonor ungron the filtered result.