// the find
micahkepe/jsongrep
A path query language for JSON, YAML, TOML, and other serialization formats.
jsongrep is a CLI tool and Rust library that queries JSON, YAML, TOML, CBOR, and MessagePack documents using path expressions that compile to a DFA. It's for developers who reach for jq often but find its filter syntax overkill when they just want to extract values at known paths. The DFA-based approach makes it genuinely fast on large documents.
The query model is the right abstraction for path matching — regex operators over paths (wildcards, Kleene star, disjunction, slices) cover 90% of real-world extraction needs without learning jq's filter DSL. The DFA compilation means you pay query parse cost once and amortize it across repeated searches, which matters if you're using the library. Multi-format support that normalizes everything to a single query engine is a practical win — querying Cargo.toml and a docker-compose.yml with the same syntax is genuinely useful. Benchmarks are done right: Criterion, multiple payload sizes, separate phases measured individually, interactive reports published.
It's a read-only extraction tool — no transforms, no mutations, no output reshaping. If you need to rewrite a JSON field or produce a different document structure, you're back to jq anyway, so you end up carrying both. The `/regex/` field-name matching is in the grammar but unimplemented and throws an error — it's the obvious next feature and the fact it's reserved but broken will trip people up. At 657 stars and 12 forks, the ecosystem is thin: no plugins, no integrations, no community recipes. If your use case has a weird edge, you're likely filing the first issue.