jaq is a JSON query tool that reimplements jq in Rust with a focus on correctness, speed, and simplicity.
The tool solves the problem of processing JSON data with a command-line interface compatible with jq. It works by compiling and executing jq query programs against JSON input. Beyond basic JSON support, jaq extends the original jq with support for additional data formats including YAML, CBOR, TOML, and XML, allowing users to query and transform data across these formats using familiar jq syntax.
jaq suits developers who need a drop-in replacement for jq with faster startup times and more predictable behavior. It works well for processing single or multiple files where jq's initialization overhead becomes noticeable, and for projects requiring support for formats beyond JSON. The tool is also available as a Rust library called jaq-core, which can be embedded in Rust programs. Unlike the C implementation of jq, jaq-core is safe to use in multi-threaded environments and supports arbitrary data types beyond JSON through a custom trait system.
The project maintains active development with regular commits addressing bug fixes and feature improvements. The codebase prioritizes maintainability through its focus on simplicity and small implementation size. The project provides comprehensive documentation including a dedicated manual and an interactive playground for testing queries. The library is published to standard Rust package repositories with API documentation available online.