

GitHub - stedolan/jq: Command-line JSON processor
source link: https://github.com/stedolan/jq
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

jq is a lightweight and flexible command-line JSON processor.
, Unix: , Windows:
If you want to learn to use jq, read the documentation at https://stedolan.github.io/jq. This documentation is generated from the docs/ folder of this repository. You can also try it online at jqplay.org.
If you want to hack on jq, feel free, but be warned that its internals are not well-documented at the moment. Bring a hard hat and a shovel. Also, read the wiki: https://github.com/stedolan/jq/wiki, where you will find cookbooks, discussion of advanced topics, internals, release engineering, and more.
Source tarball and built executable releases can be found on the homepage and on the github release page, https://github.com/stedolan/jq/releases
If you're building directly from the latest git, you'll need flex, bison (3.0 or newer), libtool, make, automake, and autoconf installed. To get regexp support you'll also need to install Oniguruma or clone it as a git submodule as per the instructions below. (note that jq's tests require regexp support to pass). To build, run:
git submodule update --init # if building from git to get oniguruma
autoreconf -fi # if building from git
./configure --with-oniguruma=builtin
make -j8
make check
To build without bison or flex, add --disable-maintainer-mode
to the
./configure invocation:
./configure --with-oniguruma=builtin --disable-maintainer-mode
(Developers must not use --disable-maintainer-mode
, not when making
changes to the jq parser and/or lexer.)
To build a statically linked version of jq, run:
make LDFLAGS=-all-static
After make finishes, you'll be able to use ./jq
. You can also
install it using:
sudo make install
If you're not using the latest git version but instead building a
released tarball (available on the website), then you won't need to
run autoreconf
(and shouldn't), and you won't need flex or bison.
To cross-compile for OS X and Windows, see docs/Rakefile's build task and scripts/crosscompile. You'll need a cross-compilation environment, such as Mingw for cross-compiling for Windows.
Cross-compilation requires a clean workspace, then:
# git clean ...
autoreconf -i
./configure
make distclean
scripts/crosscompile <name-of-build> <configure-options>
Use the --host=
and --target=
./configure options to select a
cross-compilation environment. See also
"Cross compilation" on
the wiki.
Send questions to https://stackoverflow.com/questions/tagged/jq or to the #jq channel (http://irc.lc/freenode/%23jq/) on Freenode (https://webchat.freenode.net/).
Recommend
-
49
README.md Netlify CLI
-
110
README.md Stripe CLI
-
12
RTC Work Item Command Line Work Item Command Line Version 5.3 See Work Item Command Line 5.0 for instructions how to setup and install WCL....
-
11
Documentation Reference User Guide clip (the command line illust...
-
7
Show HN: Jless, a command-line JSON viewer Show HN: Jless, a command-line JSON viewer (
-
6
March 27th, 2017 | 3 minute readMoshi, another JSON ProcessorIt’s rare for a programmer to get to work on the same problem twice. Either the first is good enough and you’re done, or it wasn’t and…
-
6
Introduction The jq language is a generator/backtracking-type functional language. Expressions produce zero, one, or more results. Producing zero results is the same backtracking, and as a result the empty
-
4
11.16 Degrees Celsius in Aachen JSON-Processor: jq Java jq is a lightweight, flexible JSON...
-
13
josn-cli is a command-line JSON viewer, written in JavaScript and TypeScript. I felt the need for a JSON browser when I...
-
3
How to format large JSON file in command linePosted on 2023, Jun 11 One min readThere are several tools that can be used to format the large json file.Prettier (if...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK