mrkeyoor.com_
Fri 30 Oct 06:49 UTC
Dataevaluationupdated 30 Oct 2026

jq review

jq is a command-line tool for extracting, filtering and reshaping JSON data. Written in portable C, it lets shell scripts work with structured fields.

Verdict

jq is a candidate for JSON selection and transformation in shell scripts. Our recorded source steps succeeded, but the test summary leaves coverage unknown. Check numeric requirements before using arithmetic on large values, and review representative input and expected output before adopting a filter.

We ran it

Lab card: what happened when we ran jqScreenshot of jq (jqlang.org)
Install✓ · 20s
Build✓ · 14s
Tests✓ · 0sran, no count parsed
Repo401 files~28,356 lines of source · 2.4 MB · 8 CI workflows · Dockerfile · tests dir

Answers from our run

Does jq build from source?

Dependencies installed in 20 seconds, and the build succeeded in 14 seconds. We cloned commit bd56a74 into a clean Debian container with 3 CPUs and no project-specific setup.

Do jq's tests pass?

Yes. The project's own test command exited successfully in 0s, although its output did not expose an individual test count.

Who should not use jq?

Workflows requiring exact arithmetic on large integers: the manual describes conversion to double precision during arithmetic, which can change values.

What are the alternatives to jq?

gojq, Mike Farah's yq. jq is a candidate for JSON selection and transformation in shell scripts.

SetupN/ARecorded source steps succeeded, but exact commands, toolchain conformity and a separate installed-binary check were not supplied.
Docs4/5Under the visible five-point editorial rubric, the README explains binary and source routes and the manual covers numeric and input-mode caveats. Platform verification was not supplied, and the body flags differing PowerShell guidance.
CommunityN/ARepository metadata and a relevant issue discussion were supplied, but representative support outcomes were not assessed.
MaturityN/AThe successful test-step summary lacks a test count or coverage evidence, and production reliability was not evaluated.

Who it’s for

Developers extracting fields from API responses or reshaping JSON in shell scripts.
Operators who need explicit filters and documented exit behavior in automation.
C developers who need to inspect or modify the JSON processor itself.

Who it’s NOT for

Workflows requiring exact arithmetic on large integers: the manual describes conversion to double precision during arithmetic, which can change values.
Teams primarily editing YAML files: Mike Farah's yq explicitly supports YAML and in-place edits.
Users expecting --slurp to reduce memory requirements: that option reads the entire input stream into a large array.

Setup reality

Our sandbox installed jq commit bd56a74 on October 24, 2026, in 20 seconds and built it in 14 seconds. The test step succeeded with a reported duration of 0 seconds. No passing-test count or test log accompanies that summary, so suite coverage remains unknown.

The README documents standalone platform binaries and a Docker image as alternatives to a source checkout. Source work uses libtool, make, automake and autoconf, with extra preparation for a Git checkout.

The recorded configuration was 3 CPUs, 8 GB RAM and image lab-cpp:1. It does not establish the compiler or operating-system version. The implementation is C despite the lab ecosystem label cpp. Shell quoting also needs attention: the supplied jq 1.8 manual and later branch documentation describe different PowerShell guidance.

jq can extract a field from JSON in a shell workflow. The adoption question is whether its filters preserve the data your script needs, especially when arithmetic involves large integers.

The README describes a JSON processor written in portable C. Its filters can select fields and construct another JSON shape. Developers working with API responses and operators writing automation should evaluate those semantics against their input.

What happened when we ran it

Our sandbox installed jq in 20 seconds and built it in 14 seconds at commit bd56a74 on October 24, 2026. The test step succeeded with a reported duration of 0 seconds. The supplied record contains no test count or underlying test output, so it does not establish suite coverage.

The scan recorded 401 files, approximately 28,356 source lines and a 2.4 MB checkout. It found eight CI workflow files, a Dockerfile and a tests directory. These are repository signals; they do not establish CI success or coverage. No vulnerability-audit result was supplied.

The sandbox configuration was 3 CPUs, 8 GB RAM and image lab-cpp:1. That label does not establish the compiler, runtime libraries or operating-system version. jq's implementation is C, although the harness groups it under cpp. The record contains no JSON throughput, peak-memory or production-dataset measurements.

Choose a binary or a source checkout

The README offers platform-specific standalone executables and a Docker image. Its source instructions name libtool, make, automake and autoconf, and distinguish a Git checkout from a released tarball. A user evaluating JSON extraction can start with a standalone executable; modifying jq itself calls for the source-development route.

Shell quoting deserves a separate check. The supplied jq 1.8 manual gives examples for Unix shells, PowerShell and cmd.exe. The branch activity feed records a documentation change separating PowerShell 7.3+ from older PowerShell guidance. Check the instructions for your shell and version before copying a command into automation. The sandbox summary does not establish which shell was used.

Documentation earns 4/5 under this editorial rubric: 1 means no usable route, 2 means partial instructions requiring substantial inference, 3 means basic instructions with material omissions, 4 means distinct routes and relevant caveats are explained, and 5 requires independent verification across the reviewed platforms. The README supplies binary and source routes, and the manual explains numeric and input-mode caveats. The supplied evidence does not establish verification across platforms; setup ease, community support and maturity remain unassessed.

Preserving a number differs from calculating with it

The manual says arithmetic triggers conversion to IEEE754 double precision. It also describes attempts to preserve the original decimal precision of number literals, subject to build configuration and exponent limits. Seeing a large number pass through a filter unchanged therefore does not establish that addition or subtraction will preserve its exact value.

Issue 3512 reports incorrect large-integer subtraction in jq 1.8.1. A project member explains that large integers are preserved outside arithmetic expressions. Later linked commits discuss work on that behavior, but those references do not establish a merged fix in the binary you use. The supplied sandbox record contains no reproduction of that calculation at commit bd56a74.

If a value is an identifier, avoid incidental arithmetic on it. If exact large-integer calculation is required, evaluate a processor with a suitable numeric model and check the specific operators you need. Successful source steps do not resolve that semantic choice.

Slurping and streaming change how filters receive input

The manual says --slurp reads the entire input stream into a large array and runs the filter once. --stream instead outputs arrays of paths and leaf values. A filter written for ordinary objects therefore needs reconsideration when using streaming input. The sandbox record provides no memory comparison between these modes.

For a small array of objects, the manual supplies this Unix-shell example:

jq '.[] | .name'

Its documented input is:

[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]

The documented output is:

"JSON"
"XML"

The iterator produces each array member, and the pipe feeds each member into .name. This is a source example, not an additional sandbox execution. Keep representative input and expected output beside your own filter. Include missing fields and no-result cases when deciding how automation should respond.

Consider gojq for integer operators and yq for YAML

gojq is a Go implementation of jq that can be embedded as a Go library. Its README says addition, subtraction, multiplication, modulo and division when divisible retain integer precision; mathematical functions convert integers to floating point. It also documents missing jq flags and regular-expression differences. Evaluate those differences before replacing an existing command.

Mike Farah's yq supports YAML and other structured formats with jq-like syntax. Its README documents in-place YAML updates and format conversion. It explicitly says it does not support everything jq does. Consider it when editing YAML is the main task. The supplied measurements establish no comparative speed or reliability advantage for either alternative.

GitHub API metadata observed October 30 records a repository last-push timestamp of October 25, 2026; support quality remains unassessed. For a first jq adoption check, review a filter against representative input and expected output, including the largest numeric values it will handle.

Alternatives

ProjectWhat it isPick it when
gojqA Go implementation of jq that can also be embedded as a Go library.Consider gojq for Go integration or exact integer addition, subtraction, multiplication, modulo and divisible division. Its README limits integer precision guarantees to those operators; mathematical functions convert integers to floating point. Check missing flags and regular-expression differences before replacing jq.
Mike Farah's yq gh↗A processor for YAML and other structured formats with jq-like syntax.Choose this when YAML editing or format conversion is the main task. Its README documents in-place updates and explicitly says it does not support everything jq does.

What people are saying

  1. [velocity-scout] jqlang/jq

Sources

  1. jq README
  2. jq manual
  3. Large-integer subtraction discussion
  4. gojq README
  5. Mike Farah's yq README
  6. jq master branch activity

More data reviews

pgx · HowToLiveLonger · ip2region · dbdelve · litestream · tesseract · the whole board →