Systems & Developer Tools / 2026
jqcpp
A C++20 command-line JSON processor that parses structured input, evaluates a practical jq-like filter language, and prints readable results.
A small tool with visible engineering
JSON is easy for software to exchange but awkward for a person to inspect quickly. Pulling one nested field or array slice often becomes a temporary script, manual copying, or a long scroll through an API response.
jqcpp focuses on the common terminal workflow: identity filters, nested field and array access, slicing, iteration, simple arithmetic, length, and keys. It does not attempt to clone the complete jq language; the smaller scope keeps the implementation understandable.
A compiler pipeline in miniature
The tool is divided into explicit stages. A JSON tokenizer and parser build the value tree. A separate expression lexer and parser produce a filter AST. The evaluator applies that AST to the input, and the pretty printer serializes the result.
Objects use vector-backed key-value storage so insertion order stays stable in formatted output. The value type is move-oriented with explicit deep-copy behavior where evaluation needs an independent result from nested data.
Quality at the boundaries
Catch2 tests cover the layers independently and exercise the complete command-line path. That separation matters because a tokenization defect can otherwise masquerade as a parser or evaluation bug. GitHub Actions configures, builds, and runs the suite so the repository behaves like a maintained open-source tool rather than a one-off parser exercise.