Vibeleaderboard
Index / tool
Visit jqlang.org
Category
Developer Tools
Rank
Pricing
Open Source
Type
TOOL
Use case
Data Processing
Interfaces
CLI
Builder
jqlang
Latest release
jq-1.8.2
Date

About

A lightweight command-line JSON processor that lets you slice, filter, map, and transform JSON data with zero runtime dependencies. Think of it as sed, awk, or grep specifically designed for JSON.

What it does

jq reads JSON from files or standard input, runs a filter program against each input value, and writes resulting values to standard output.

Why it's ranked here

jq makes a strong case for shell-based data work. Portable C and no runtime dependencies keep deployment simple, while streaming input, configurable output, argument binding, modules, and meaningful exit behavior support serious automation.

What's good

It handles both compact and readable output, raw strings, sorted keys, ASCII escaping, JSON sequences, and streaming parsing. Filters can come from files, receive named or positional values, and search module directories. Prebuilt binaries and Docker provide quick installation paths.

Tradeoffs

Its filter language and extensive command options create more learning work than simple field extraction suggests. Building from a repository checkout requires several build tools and a submodule, with extra parser-generator tools potentially needed. Some mathematical operations depend on platform capabilities discovered during compilation.

How to use it well

Use jq in shell pipelines, build scripts, and automation that receives JSON and must select, reshape, format, or test results. Prefer streaming mode for inputs that should not be parsed as one complete value. It does not replace the surrounding program that obtains, stores, or transports the data.

Technical notes+

README.md documents prebuilt binaries, a Docker image, Autotools-based source builds, static linking, and cross-compilation guidance. src/main.c implements the CLI, including raw, slurp, streaming, sequence, module-path, argument-binding, output-format, and exit-status modes; it also applies an Oniguruma parse-depth limit and contains Windows and OpenBSD branches. src/jq.h exposes a C API for compilation, execution, callbacks, attributes, input handling, halting, and teardown. src/jv.h and src/jv.c define the reference-counted JSON value layer, parser, printing flags, arrays, objects, strings, numbers, and comparisons. src/util.c manages multi-file input and position-aware errors. src/lexer.c and src/lexer.h contain the generated reentrant Flex scanner.

Observed

License
MIT for jq, CC BY 3.0 for documentation, with decNumber portions under the ICU License
Primary language
Portable C
Runtime dependencies
The README states zero runtime dependencies
Install surface
Prebuilt release binaries, Docker image, source build, and static-link build
Interfaces
Command-line interface and a public C API
Platform support
Source includes dedicated Windows handling and an OpenBSD pledge branch
Build system
Source builds use libtool, make, automake, autoconf, and configure

Read from README.md, src/main.c, src/jq.h, src/jv.c, src/jv.h, src/libm.h, src/util.c, src/util.h, src/lexer.c, src/lexer.h, src/jv_aux.c.

What it can do

  • Filter JSON data based on conditions

    JSON data and filter criteria → Filtered JSON subset

  • Extract specific fields from JSON objects

    JSON data and field selectors → Selected JSON values or fields

  • Transform JSON structure and format

    JSON data and transformation rules → Restructured JSON data

  • Map operations across JSON arrays

    JSON array and mapping expression → Transformed JSON array

  • Parse and validate JSON syntax

    Raw JSON text → Parsed JSON or syntax errors

  • Format and pretty-print JSON

    Unformatted JSON data → Formatted, readable JSON

Tags

jsoncliparserfiltertransformcommand-linedata-processing

Tech Stack

Docker

Media

jq

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.