Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Command-line JSON processor
Failed to load latest commit information.
build Rake task to build website including source dist and binaries.
config Update .gitignore and config/.gitignore
docs Fix #705 (--argfile weirdness)
m4 BSD sed lacks -r; fix #551
scripts Partial revamp of `scripts/crosscompile`
tests Test in-place functionality; fix #704
.gitattributes Remove .gitignore from tarballs.
.gitignore Add --disable-maintainer-mode; make bison optional
.travis.yml .travis.yml: Set sudo false; use containers
AUTHORS Correct @wtlangford's address
COPYING Add a COPYING file with too many words in it.
ChangeLog Remove remnants of `--online-input` option
Makefile.am Add --disable-maintainer-mode; make bison optional
NEWS Add ChangeLog and NEWS files
README Check in a pile of Autotools junk, including the configure script.
README.md README tweaks
builtin.c Fix #702
builtin.h Add callback interface for errors
bytecode.c Further module system revamp (fix #659)
bytecode.h Add `label $name | EXP`; fix `break`
compile-ios.sh Added cross-compilation script to build libjq for iOS.
compile.c Further module system revamp (fix #659)
compile.h Further module system revamp (fix #659)
configure.ac Correct automake and autoconf version requirements
exec_stack.h exec_stack.h was not using jv_mem_realloc()
execute.c Reduce number of msg callback typedefs
jq.1.default Add some build instructions for how to install doc dependencies.
jq.1.prebuilt Remove remnants of `--online-input` option
jq.h Reduce number of msg callback typedefs
jq.spec include additional files in jq.spec
jq_parser.h Fold opcode.{c,h} into bytecode.{c,h}
jq_test.c Fix --run-tests arg handling
jv.c Split on empty sep: fix #552 moar
jv.h Refactor moar: move parts of main.c into libjq
jv_alloc.c Add autoconf checks for pthreads; fix #340
jv_alloc.h Add libjq autoconf goo
jv_aux.c Remove string indexing by string (fix #454)
jv_dtoa.c Detect endianness at configuration with Autoconf AC_C_BIGENDIAN feature
jv_dtoa.h Format more integers as integers, not scientific notation.
jv_file.c Add flags argument to jv_parser_new()
jv_parse.c Fix sequence warnings (fix #686)
jv_print.c Print stack value refcounts when tracing (#636)
jv_unicode.c Added regex support as per issue #164.
jv_unicode.h Fix various UTF8 parsing bugs.
jv_utf8_tables.h Reject all overlong UTF8 sequences.
lexer.c Add --disable-maintainer-mode; make bison optional
lexer.h Add --disable-maintainer-mode; make bison optional
lexer.l Add `label $name | EXP`; fix `break`
libm.h Add cbrt (cube root)
linker.c Look for jq/main.jq for imports
linker.h Add `module` directive, `modulemeta` builtin
locfile.c Add jq_report_error() function; use it
locfile.h Added library system with -l, -L, and JQ_LIBRARY_PATH
main.c Fix #705 (--argfile weirdness)
opcode_list.h Further module system revamp (fix #659)
parser.c Add --disable-maintainer-mode; make bison optional
parser.h Add --disable-maintainer-mode; make bison optional
parser.y Further module system revamp (fix #659)
setup.sh Add --disable-maintainer-mode; make bison optional
util.c Reduce number of msg callback typedefs
util.h Add mkstemp() for mingw build

README.md

jq

jq is a command-line JSON processor.

If you want to learn to use jq, read the documentation at http://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: http://github.com/stedolan/jq/wiki

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, and autoconf installed. To get regexp support you'll also need to install Oniguruma (note that jq's tests require regexp support to pass). To build, run:

autoreconf -i   # if building from git
./configure
make -j8
make check

To build without bison or flex, add --disable-maintainer-mode to the ./configure invocation:

./configure --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 the wiki.

Something went wrong with that request. Please try again.