jq
No Change
adopt
jq. Is a lightweight command-line JSON processor: the default tool for slicing, filtering, mapping, and transforming JSON in shell pipelines, CI, and ad hoc debugging.
Summary
jq (jqlang/jq) is a portable C binary with zero runtime dependencies: filter expressions, pretty-printing, arithmetic, objects/arrays, and streaming for large inputs. The project revived under the jqlang org (1.7+ after a long hiatus); current stable is 1.8.x per jqlang.org.
Use in one-liners (curl … | jq '.items[]'), policy checks (parse terraform show -json), and log wrangling. Prefer yq when you need YAML round-trips with comments preserved; prefer jq when JSON is the native format or you want the de facto query dialect.
Details
- Install: download (static binary), Homebrew (
jq), apt/dnf packages; verify withjq --version. - Docs: tutorial, manual.
- License: MIT (upstream).
- CI / ops: pipe API and tool JSON output through
jqfor assertions and field extraction; combine withcurl,gh api,kubectl … -o json. - Fit: Tool: CLI JSON query/processor.
- Contrast: yq for YAML-first workflows; language-native JSON APIs when a shell one-liner is not enough.