# jq changelog > Lightweight and flexible command-line JSON processor - Vendor: jq - Category: Developer Tools - Official site: https://jqlang.github.io/jq/ - Tracked by: What's New (https://whatsnew.fyi/product/jq) - Harvested from: GitHub (jqlang/jq) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### jq-1.8.2 — jq 1.8.2 - Date: 2026-06-20 - Version: jq-1.8.2 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.8.2 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.8.2 - **security** — Fix heap buffer overflow in jvp_string_append and jvp_string_copy_replace_bad - **security** — Limit path depth to prevent stack overflow in jv_setpath, jv_getpath, jv_delpaths - **security** — Fix NUL truncation in the JSON parser - **security** — Fix _strindices missing runtime type checks - **security** — Fix out-of-bounds read in jv_parse_sized() - **security** — Randomize hash seed to mitigate hash collision DoS attacks - **security** — Limit containment check depth to prevent stack overflow in contains - **security** — Fix NUL truncation in program files loaded with -f - **security** — Fix signed-int overflow in stack_reallocate - **security** — Reject numeric literals longer than DEC_MAX_DIGITS (999999999) - **security** — Reject embedded NUL bytes in module import paths - **security** — Limit recursive object merge depth to prevent stack overflow - **security** — Detect circular module imports to prevent stack overflow - **security** — Guard deep structural equality and comparison recursion - **security** — Fix heap-buffer-overflow in raw file loading - **security** — Tighten string length bounds and propagate invalid jv in implode - **security** — Fix use-after-free in args2obj() array argument path - **security** — Fix signed-int overflow in tokenadd to prevent buffer overflow - **security** — Limit the number of function parameters and definitions to prevent SEGV - **fixed** — Improve error message truncation with closing delimiters This is a patch release with security fixes and bug fixes since 1.8.1, along with new builds for Windows arm64 and Docker arm/v7. Full commit log can be found at . ##### Security fixes - CVE-2026-32316: Fix heap buffer overflow in `jvp_string_append` and `jvp_string_copy_replace_bad`. @itchyny e47e56d226519635768e6aab2f38f0ab037c09e5 - CVE-2026-33947: Limit path depth to prevent stack overflow in `jv_setpath`, `jv_getpath`, `jv_delpaths`. @itchyny fb59f1491058d58bdc3e8dd28f1773d1ac690a1f - CVE-2026-33948: Fix NUL truncation in the JSON parser. @itchyny 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b - CVE-2026-39956: Fix `_strindices` missing runtime type checks. @tlsbollei fdf8ef0f0810e3d365cdd5160de43db46f57ed03 - CVE-2026-39979: Fix out-of-bounds read in `jv_parse_sized()`. @wader 2f09060afab23fe9390cce7cb860b10416e1bf5f - CVE-2026-40164: Randomize hash seed to mitigate hash collision DoS attacks. @AsafMeizner @itchyny 0c7d133c3c7e37c00b6d46b658a02244fdd3c784 - CVE-2026-40612: Limit containment check depth to prevent stack overflow in `contains`. @itchyny d1a12569d91641135976a8536776a4a329c02cc2 - CVE-2026-41256: Fix NUL truncation in program files loaded with `-f`. @itchyny 5a015deae35d19e3ebbc65db6c157a80e76df738 - CVE-2026-41257: Fix signed-int overflow in `stack_reallocate`. @itchyny 01b3cded76daacbfddb7f8763700b0803bcb5c6f - CVE-2026-43894: Reject numeric literals longer than `DEC_MAX_DIGITS` (999999999). @itchyny 9761ceb7d6cc48c16b25f0ab1baaef0e701927e4 - CVE-2026-43895: Reject embedded NUL bytes in module import paths. @itchyny 9d223f153c3632a207fa071caaa6292da33ae361 - CVE-2026-43896: Limit recursive object merge depth to prevent stack overflow. @itchyny 532ccea6080ed6758f39fe9f6208a44b665023d2 - CVE-2026-44777: Detect circular module imports to prevent stack overflow. @itchyny f58787c41835d9b17795730cb04925fdba25c71c - CVE-2026-47770: Guard deep structural equality and comparison recursion. @fuyu0425 7122866869960b55cea3646bc91334ef55787831 - CVE-2026-49839: Fix heap-buffer-overflow in raw file loading. @itchyny e987df0d463d85fd70825e042a082427e8275b86 - CVE-2026-54679: Tighten string length bounds and propagate invalid jv in implode. @itchyny 46d1da30944ce93dd671ac72b6513fc0eb747837 - GHSA-gf4g-95wj-4q4r: Fix use-after-free in `args2obj()` array argument path. @sseal #3498 - GHSA-hj52-j2c9-r8r4: Fix signed-int overflow in `tokenadd` to prevent buffer overflow. @itchyny 63751f8a9f94dc6d3370084ad0d60826c58b955d - Limit the number of function parameters and definitions to prevent SEGV. @OwenSanzas #3460 - Pre-allocate `tokenbuf` for string parser to avoid undefined behavior. @fab1ano #3485 - Avoid stack overflow when freeing deeply nested values. @itchyny 33d7bce3218ec718139342e5b48b475c4dea715f - Fix memory leaks and double frees. @itchyny #3487 ##### Releasing - Add builds for Windows arm64. @dennisameling #3376 - Support arm/v7 architecture in Docker images. @itchyny #3463 - Update GPG signing key. @itchyny 0ff997f7c4c07660ffc6ad2506d5f56b8136208b - Add `artifact-metadata` permission for actions/attest. @itchyny #3530 - Upload attestation bundle as a release artifact, allowing unauthenticated verification via `gh attestation verify --bundle jq-attestation.json`. @itchyny #3563 ##### CLI changes - Improve error message truncation with closing delimiters. @itchyny #3478 - Remove extra space from `die` function output. @krtk6160 #3391 - Fix raw input flag not to corrupt multi-byte characters. @itchyny #3421 - Fix crash when importing a module with errors twice. @itchyny #3497 - Increase the maximum printing depth from 256 to 10000. @ishnagy #3414 ##### Changes to existing functions - Fix `rtrimstr("")` always outputting `""`. @A4-Tacks #3415 - Fix infinite loop and undefined behavior in `del(.[nan])`. @itchyny #3490 - Refactor `@uri` and `@urid` to fix multi-byte UTF-8 corruption. @itchyny #3495 - Fix `tonu _[Truncated at 4000 characters — full notes: https://github.com/jqlang/jq/releases/tag/jq-1.8.2]_ ### jq-1.8.1 — jq 1.8.1 - Date: 2025-07-01 - Version: jq-1.8.1 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.8.1 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.8.1 - **security** — Fix heap use after free in f_strftime, f_strflocaltime - **security** — Fix stack overflow in node_min_byte_len of oniguruma - **fixed** — Fix assertion failure when syntax error happens at the end of the query - **fixed** — Fix portability of strptime/1 especially for Windows - **changed** — Revert the change of reduce/foreach state variable in 1.8.0 due to serious performance regression - **fixed** — Fix build on old Mac with old sed This is a patch release to fix security, performance, and build issues found in 1.8.0. Full commit log can be found at . ##### Security fixes - CVE-2025-49014: Fix heap use after free in `f_strftime`, `f_strflocaltime`. @wader 499c91bca9d4d027833bc62787d1bb075c03680e - GHSA-f946-j5j2-4w5m: Fix stack overflow in `node_min_byte_len` of oniguruma. @wader 5e159b34b179417e3e0404108190a2ac7d65611c ##### CLI changes - Fix assertion failure when syntax error happens at the end of the query. @itchyny #3350 ##### Changes to existing functions - Fix portability of `strptime/1` especially for Windows. @itchyny #3342 ##### Language changes - Revert the change of `reduce`/`foreach` state variable in 1.8.0 (#3205). This change was reverted due to serious performance regression. @itchyny #3349 ##### Documentation changes - Add LICENSE notice of NetBSD's `strptime()` to COPYING. @itchyny #3344 ##### Build improvements - Fix build on old Mac with old sed. @qianbinbin #3336 ### jq-1.8.0 — jq 1.8.0 - Date: 2025-06-01 - Version: jq-1.8.0 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.8.0 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.8.0 - **security** — Fix signed integer overflow in jvp_array_write and jvp_object_rehash by limiting the maximum size of arrays and objects to 536870912 (2^29) elements - **security** — Reject NaN with payload while parsing JSON, dropping support for NaN with payload like NaN123 - **security** — Fix heap buffer overflow in jv_string_vfmt - **security** — Fix use of uninitialized value in check_literal - **security** — Fix segmentation fault on strftime/1 and strflocaltime/1 - **security** — Fix unhandled overflow in @base64d - **changed** — Change version number pattern to 1.X.Y format - **added** — Generate provenance attestations for release artifacts and docker image - **fixed** — Fix --indent 0 implicitly enabling --compact-output - **changed** — Improve error messages to show problematic position in the filter - **changed** — Include column number in parser and compiler error messages - **fixed** — Fix error message for string literal beginning with single quote - **changed** — Improve JQ_COLORS environment variable to support larger escapes like truecolor - **added** — Add --library-path long option for -L - **fixed** — Fix --slurp --stream when input has no trailing newline character - **fixed** — Fix --indent option to error for malformed values - **fixed** — Fix option parsing of --binary on non-Windows platforms - **fixed** — Fix issue with ~/.jq on Windows where $HOME is not set - **fixed** — Fix broken non-Latin output in the command help on Windows - **changed** — Increase the maximum parsing depth for JSON to 10000 - **added** — Add trim/0, ltrim/0 and rtrim/0 functions to trim leading and trailing white spaces - **added** — Add trimstr/1 function to trim string from both ends - **added** — Add add/1 generator variant of add/0 - **added** — Add skip/2 as the counterpart to limit/2 - **added** — Add toboolean/0 to convert strings to booleans - **added** — Add @urid format as reverse of @uri - **changed** — Use code point index for indices/1, index/1 and rindex/1 - **changed** — Improve tonumber/0 performance and reject numbers with leading or trailing white spaces - **changed** — Populate timezone data when formatting time, fixing timezone name in strftime/1 and strflocaltime/1 for DST - **changed** — Preserve numerical precision on unary negation, abs/0, length/0 - **changed** — Make last(empty) yield no output values like first(empty) - **changed** — Make ltrimstr/1 and rtrimstr/1 error for non-string inputs - **changed** — Make limit/2 error for negative count - **fixed** — Fix mktime/0 overflow and allow fewer elements in date-time representation array - **fixed** — Fix non-matched optional capture group - **added** — Provide strptime/1 on all systems - **fixed** — Fix _WIN32 port of strptime - **changed** — Improve bsearch/1 performance by implementing in C - **changed** — Improve unique/0 and unique_by/1 performance - **removed** — Remove pow10/0 as it has been deprecated in glibc 2.27, use exp10/0 instead We are pleased to announce the release of version 1.8.0. This release includes a number of improvements since the last version. Note that some changes may introduce breaking changes to existing scripts, so be sure to read the following information carefully. Full commit log can be found at . ##### Releasing - Change the version number pattern to `1.X.Y` (`1.8.0` instead of `1.8`). @itchyny #2999 - Generate provenance attestations for release artifacts and docker image. @lectrical #3225 ```sh gh attestation verify --repo jqlang/jq jq-linux-amd64 gh attestation verify --repo jqlang/jq oci://ghcr.io/jqlang/jq:1.8.0 ``` ##### Security fixes - CVE-2024-23337: Fix signed integer overflow in `jvp_array_write` and `jvp_object_rehash`. @itchyny de21386681c0df0104a99d9d09db23a9b2a78b1e - The fix for this issue now limits the maximum size of arrays and objects to 536870912 (`2^29`) elements. - CVE-2024-53427: Reject NaN with payload while parsing JSON. @itchyny a09a4dfd55e6c24d04b35062ccfe4509748b1dd3 - The fix for this issue now drops support for NaN with payload in JSON (like `NaN123`). Other JSON extensions like `NaN` and `Infinity` are still supported. - CVE-2025-48060: Fix heap buffer overflow in `jv_string_vfmt`. @itchyny c6e041699d8cd31b97375a2596217aff2cfca85b - Fix use of uninitialized value in `check_literal`. @itchyny #3324 - Fix segmentation fault on `strftime/1`, `strflocaltime/1`. @itchyny #3271 - Fix unhandled overflow in `@base64d`. @emanuele6 #3080 ##### CLI changes - Fix `--indent 0` implicitly enabling `--compact-output`. @amarshall @gbrlmarn @itchyny #3232 ```sh $ jq --indent 0 . <<< '{ "foo": ["hello", "world"] }' { "foo": [ "hello", "world" ] } # Previously, this implied --compact-output, but now outputs with new lines. ``` - Improve error messages to show problematic position in the filter. @itchyny #3292 ```sh $ jq -n '1 + $foo + 2' jq: error: $foo is not defined at , line 1, column 5: 1 + $foo + 2 ^^^^ jq: 1 compile error ``` - Include column number in parser and compiler error messages. @liviubobocu #3257 - Fix error message for string literal beginning with single quote. @mattmeyers #2964 ```sh $ jq .foo <<< "{'foo':'bar'}" jq: parse error: Invalid string literal; expected ", but got ' at line 1, column 7 # Previously, the error message was Invalid numeric literal at line 1, column 7. ``` - Improve `JQ_COLORS` environment variable to support larger escapes like truecolor. @SArpnt #3282 ```sh JQ_COLORS="38;2;255;173;173:38;2;255;214;165:38;2;253;255;182:38;2;202;255;191:38;2;155;246;255:38;2;160;196;255:38;2;189;178;255:38;2;255;198;255" jq -nc '[null,false,true,42,{"a":"bc"}]' ``` - Add `--library-path` long option for `-L`. @thaliaarchi #3194 - Fix `--slurp --stream` when input has no trailing newline character. @itchyny #3279 - Fix `--indent` option to error for malformed values. @thaliaarchi #3195 - Fix option parsing of `--binary` on non-Windows platforms. @calestyo #3131 - Fix issue with `~/.jq` on Windows where `$HOME` is not set. @kirkoman #3114 - Fix broken non-Latin output in the command help on Windows. @itchyny #3299 - Increase the maximum parsing depth for JSON to 10000. @itchyny #3328 - Parse short options in order given. @thaliaarchi #3194 - Consistently reset color formatting. @thaliaarchi #3034 ##### New functions - Add `trim/0`, `ltrim/0` and `rtrim/0` to trim leading and trailing white spaces. @wader #3056 ```sh $ jq -n '" hello " | trim, ltrim, rtrim' "hello" "hello " " hello" ``` - Add `trimstr/1` to trim string from both ends. @gbrlmarn #3319 ```sh $ jq -n '"foobarfoo" | trimstr("foo")' "bar" ``` - Add `add/1`. Generator variant of `add/0`. @myaaaaaaaaa #3144 ```sh $ jq -c '.sum = add(.xs[])' <<< '{"xs": _[Truncated at 4000 characters — full notes: https://github.com/jqlang/jq/releases/tag/jq-1.8.0]_ ### jq-1.7.1 — jq 1.7.1 - Date: 2023-12-13 - Version: jq-1.7.1 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.7.1 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.7.1 - **security** — Fix heap buffer overflow in jvp_literal_number_literal (CVE-2023-50246) - **security** — Fix stack-buffer-overflow if comparing nan with payload (CVE-2023-50268) - **changed** — Make the default background color more suitable for bright backgrounds - **added** — Allow passing the inline jq script after -- - **changed** — Restrict systems operations on OpenBSD and remove unused mkstemp - **fixed** — Fix possible uninitialised value dereference if jq_init() fails - **changed** — Simplify paths/0 and paths/1 - **changed** — Reject U+001F in string literals - **changed** — Convert decnum to binary64 (double) instead of decimal64 to behave like the JSON specification suggests - **fixed** — Fix memory leaks on invalid input for ltrimstr/1 and rtrimstr/1 - **fixed** — Fix memory leak on failed get for setpath/2 - **fixed** — Fix nan from json parsing also for nans with payload that start with 'n' - **changed** — Allow carriage return characters in comments - **added** — Add extern C for C++ in libjq - **fixed** — Actually use the number correctly casted from double to int as index - **fixed** — Remove undefined behavior caught by LLVM 10 UBSAN ##### Security - CVE-2023-50246: Fix heap buffer overflow in jvp\_literal\_number\_literal - CVE-2023-50268: fix stack-buffer-overflow if comparing nan with payload ##### CLI changes - Make the default background color more suitable for bright backgrounds. @mjarosie @taoky @nicowilliams @itchyny #2904 - Allow passing the inline jq script after `--`. @emanuele6 #2919 - Restrict systems operations on OpenBSD and remove unused `mkstemp`. @klemensn #2934 - Fix possible uninitialised value dereference if `jq_init()` fails. @emanuele6 @nicowilliams #2935 ##### Language changes - Simplify `paths/0` and `paths/1`. @asheiduk @emanuele6 #2946 - Reject `U+001F` in string literals. @torsten-schenk @itchyny @wader #2911 - Remove unused nref accumulator in `block_bind_library`. @emanuele6 #2914 - Remove a bunch of unused variables, and useless assignments. @emanuele6 #2914 - main.c: Remove unused EXIT\_STATUS\_EXACT option. @emanuele6 #2915 - Actually use the number correctly casted from double to int as index. @emanuele6 #2916 - src/builtin.c: remove unnecessary jv\_copy-s in type\_error/type\_error2. @emanuele6 #2937 - Remove undefined behavior caught by LLVM 10 UBSAN. @Gaelan @emanuele6 #2926 - Convert decnum to binary64 (double) instead of decimal64. This makes jq behave like the JSON specification suggests and more similar to other languages. @wader @leonid-s-usov #2949 - Fix memory leaks on invalid input for `ltrimstr/1` and `rtrimstr/1`. @emanuele6 #2977 - Fix memory leak on failed get for `setpath/2`. @emanuele6 #2970 - Fix nan from json parsing also for nans with payload that start with 'n'. @emanuele6 #2985 - Allow carriage return characters in comments. @emanuele6 #2942 #2984 ##### Documentation changes - Generate links in the man page. @emanuele6 #2931 - Standardize arch types to AMD64 & ARM64 from index page download dropdown. @owenthereal #2884 ##### libjq - Add extern C for C++. @rockwotj #2953 ##### Build and test changes - Fix incorrect syntax for checksum file. @kamontat @wader #2899 - Remove `-dirty` version suffix for windows release build. @itchyny #2888 - Make use of `od` in tests more compatible. @nabijaczleweli @emanuele6 @nicowilliams #2922 - Add dependabot. @yeikel #2889 - Extend fuzzing setup to fuzz parser and and JSON serializer. @DavidKorczynski @emanuele6 #2952 - Keep releasing executables with legacy names. @itchyny #2951 ##### New Contributors * @yeikel made their first contribution in https://github.com/jqlang/jq/pull/2889 * @dependabot made their first contribution in https://github.com/jqlang/jq/pull/2894 * @kamontat made their first contribution in https://github.com/jqlang/jq/pull/2899 * @taoky made their first contribution in https://github.com/jqlang/jq/pull/2904 * @tboz203 made their first contribution in https://github.com/jqlang/jq/pull/2920 * @nabijaczleweli made their first contribution in https://github.com/jqlang/jq/pull/2922 * @klemensn made their first contribution in https://github.com/jqlang/jq/pull/2934 * @asheiduk made their first contribution in https://github.com/jqlang/jq/pull/2946 * @rockwotj made their first contribution in https://github.com/jqlang/jq/pull/2953 * @jesperronn made their first contribution in https://github.com/jqlang/jq/pull/2898 **Full Changelog**: https://github.com/jqlang/jq/compare/jq-1.7...jq-1.7.1 ### jq-1.7 — jq 1.7 - Date: 2023-09-06 - Version: jq-1.7 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.7 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.7 - **added** — Make object key color configurable using JQ_COLORS environment variable - **added** — Respect NO_COLOR environment variable to disable color output - **added** — Add --binary/-b on Windows for binary output to get \n instead of \r\n line endings - **added** — Add --raw-output0 for NUL (zero byte) separated output - **added** — Add new builtin pick(stream) to emit a projection of the input object or array - **added** — Add new builtin debug(msgs) that works like debug but applies a filter on the input before writing to stderr - **added** — Add new builtin scan($re; $flags) for pattern matching - **changed** — Change the default color of null to Bright Black - **changed** — Use decimal number literals to preserve precision in number handling - **changed** — Improve --help output with all options and nicer order - **changed** — NEWS file is replaced by NEWS.md with Markdown format - **changed** — CI, scan builds, release, and website builds now use GitHub actions - **changed** — Website updated with new section search box, better section ids for linking, and dark mode - **changed** — Docker images are now available from ghcr.io/jqlang/jq instead of Docker Hub - **fixed** — Fix multiple issues of exit code using --exit-code/-e option - **fixed** — Fix assert crash and validate JSON for --jsonarg - **fixed** — Enable stack protection - **removed** — Remove deprecated --argfile option After a five year hiatus we're back with a GitHub organization, with new admins and new maintainers who have brought a great deal of energy to make a long-awaited and long-needed new release. We're very grateful for all the new owners, admins, and maintainers. Special thanks go to Owen Ou (@owenthereal) for pushing to set up a new GitHub organization for jq, Stephen Dolan (@stedolan) for transferring the jq repository to the new organization, @itchyny for doing a great deal of work to get the release done, Mattias Wadman (@wader) and Emanuele Torre (@emanuele6) for many PRs and code reviews. Many others also contributed PRs, issues, and code reviews as well, and you can find their contributions in the Git log and on the [closed issues and PRs page](https://github.com/jqlang/jq/issues?q=is%3Aclosed+sort%3Aupdated-desc). ##### What's Changed Since the last stable release many things have happened: - jq now lives at - New maintainers, admins, and owners have been recruited. - A list of [current maintainers](https://github.com/jqlang/jq/blob/jq-1.7/AUTHORS#L4-L14) - NEWS file is replaced by NEWS.md with Markdown format. @wader #2599 - CI, scan builds, release, website builds etc now use GitHub actions. @owenthereal @wader @itchyny #2596 #2603 #2620 #2723 - Lots of documentation improvements and fixes. - Website updated with new section search box, better section ids for linking, dark mode, etc. @itchyny #2628 - Release builds for: - Linux `amd64`, `arm64`, `armel`, `armhf`, `i386`, `mips`, `mips64`, `mips64el`, `mips64r6`, `mips64r6el`, `mipsel`, `mipsr6`, `mipsr6el`, `powerpc`, `ppc64el`, `riscv64` and `s390x` - macOS `amd64` and `arm64` - Windows `i386` and `amd64` - Docker `linux/386`, `linux/amd64`, `linux/arm64`, `linux/mips64le`, `linux/ppc64le`, `linux/riscv64` and `linux/s390x` - More details see @owenthereal #2665 - Docker images are now available from `ghcr.io/jqlang/jq` instead of Docker Hub. @itchyny #2652 #2686 - OSS-fuzz. @DavidKorczynski #2760 #2762 Full commit log can be found at but here are some highlights: ##### CLI changes - Make object key color configurable using `JQ_COLORS` environment variable. @itchyny @haguenau @ericpruitt #2703 ```sh # this would make "field" bold yellow (`1;33`, the last value) $ JQ_COLORS="0;90:0;37:0;37:0;37:0;32:1;37:1;37:1;33" ./jq -n '{field: 123}' { "field": 123 } ``` - Change the default color of null to Bright Black. @itchyny #2824 - Respect `NO_COLOR` environment variable to disable color output. See for details. @itchyny #2728 - Improved `--help` output. Now mentions all options and nicer order. @itchyny @wader #2747 #2766 #2799 - Fix multiple issues of exit code using `--exit-code`/`-e` option. @ryo1kato #1697 ```sh # true-ish last output value exits with zero $ jq -ne true ; echo $? true 0 # false-ish last output value (false and null) exits with 1 $ jq -ne false ; echo $? false 1 # no output value exists with 4 $ jq -ne empty ; echo $? 4 ``` - Add `--binary`/`-b` on Windows for binary output. To get `\n` instead of `\r\n` line endings. @nicowilliams 0dab2b1 - Add `--raw-output0` for NUL (zero byte) separated output. @asottile @pabs3 @itchyny #1990 #2235 #2684 ```sh # will output a zero byte after each output $ jq -n --raw-output0 '1,2,3' | xxd 00000000: 3100 3200 3300 1.2.3. # can be used with xargs -0 $ jq -n --raw-output0 '"a","b","c"' | xargs -0 -n1 a b c $ jq -n --raw-output0 '"a b c", "d\ne\nf"' | xargs -0 printf '[%s]\n' [a b c] [d e f] # can be used with read -d '' $ while IFS= read -r -d '' json; do > jq '.name' <<< "$json" > done < <(jq -n --raw-output0 '{name:"a b c"},{name:"d\ne\nf"}') "a b c" "d\ne\nf" # also it's an error to output a string cont _[Truncated at 4000 characters — full notes: https://github.com/jqlang/jq/releases/tag/jq-1.7]_ ### jq-1.7rc2 — jq 1.7rc2 - Date: 2023-08-27 - Version: jq-1.7rc2 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.7rc2 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.7rc2 - Labels: Pre-release - **changed** — NEWS file is replaced by NEWS.md with Markdown format - **changed** — CI, scan builds, release, and website builds now use GitHub actions - **changed** — Website updated with new section search box, better section ids for linking, and dark mode - **added** — Make object key color configurable using JQ_COLORS environment variable - **changed** — Change the default color of null to Bright Black - **added** — Respect NO_COLOR environment variable to disable color output - **changed** — Improved --help output with all options mentioned in nicer order - **fixed** — Fix multiple issues of exit code using --exit-code/-e option - **added** — Add --binary/-b on Windows for binary output to get \n instead of \r\n line endings - **added** — Add --raw-output0 for NUL (zero byte) separated output - **fixed** — Fix assert crash and validate JSON for --jsonarg - **removed** — Remove deprecated --argfile option - **changed** — Enable stack protection - **changed** — Use decimal number literals to preserve precision in comparisons and sorting - **added** — Add new builtin pick(stream) to emit a projection of the input object or array - **added** — Add new builtin debug(msgs) that applies a filter on the input before writing to stderr - **added** — Add new builtin scan($re; $flags) for pattern matching with flags - **added** — Add new builtin abs to get absolute value while preserving literal number values - **changed** — Allow if without else-branch, where the omitted else-branch defaults to identity (.) - **changed** — Docker images are now available from ghcr.io/jqlang/jq instead of Docker Hub Note that this is a pre-release. Feedback is welcome #2862. --- After a five year hiatus we're back with a GitHub organization, with new admins and new maintainers who have brought a great deal of energy to make a long-awaited and long-needed new release. Since the last stable release many things have happened: - jq now lives at - New maintainers, admins, and owners have been recruited. - A list of [current maintainers](https://github.com/jqlang/jq/blob/jq-1.7/AUTHORS#L4-L14) - NEWS file is replaced by NEWS.md with Markdown format. @wader #2599 - CI, scan builds, release, website builds etc now use GitHub actions. @owenthereal @wader @itchyny #2596 #2603 #2620 #2723 - Lots of documentation improvements and fixes. - Website updated with new section search box, better section ids for linking, dark mode, etc. @itchyny #2628 - Release builds for: - Linux `amd64`, `arm64`, `armel`, `armhf`, `i386`, `mips`, `mips64`, `mips64el`, `mips64r6`, `mips64r6el`, `mipsel`, `mipsr6`, `mipsr6el`, `powerpc`, `ppc64el`, `riscv64` and `s390x` - macOS `amd64` and `arm64` - Windows `i386` and `amd64` - Docker `linux/386`, `linux/amd64`, `linux/arm64`, `linux/mips64le`, `linux/ppc64le`, `linux/riscv64` and `linux/s390x` - More details see @owenthereal #2665 - Docker images are now available from `ghcr.io/jqlang/jq` instead of Docker Hub. @itchyny #2652 #2686 - OSS-fuzz. @DavidKorczynski #2760 #2762 Full commit log can be found at but here are some highlights: ##### CLI changes - Make object key color configurable using `JQ_COLORS` environment variable. @itchyny @haguenau @ericpruitt #2703 ```sh # this would make "field" bold yellow (`1;33`, the last value) $ JQ_COLORS="0;90:0;37:0;37:0;37:0;32:1;37:1;37:1;33" ./jq -n '{field: 123}' { "field": 123 } ``` - Change the default color of null to Bright Black. @itchyny #2824 - Respect `NO_COLOR` environment variable to disable color output. See for details. @itchyny #2728 - Improved `--help` output. Now mentions all options and nicer order. @itchyny @wader #2747 #2766 #2799 - Fix multiple issues of exit code using `--exit-code`/`-e` option. @ryo1kato #1697 ```sh # true-ish last output value exits with zero $ jq -ne true ; echo $? true 0 # false-ish last output value (false and null) exits with 1 $ jq -ne false ; echo $? false 1 # no output value exists with 4 $ jq -ne empty ; echo $? 4 ``` - Add `--binary`/`-b` on Windows for binary output. To get `\n` instead of `\r\n` line endings. @nicowilliams 0dab2b1 - Add `--raw-output0` for NUL (zero byte) separated output. @asottile @pabs3 @itchyny #1990 #2235 #2684 ```sh # will output a zero byte after each output $ jq -n --raw-output0 '1,2,3' | xxd 00000000: 3100 3200 3300 1.2.3. # can be used with xargs -0 $ jq -n --raw-output0 '"a","b","c"' | xargs -0 -n1 a b c $ jq -n --raw-output0 '"a b c", "d\ne\nf"' | xargs -0 printf '[%s]\n' [a b c] [d e f] # can be used with read -d '' $ while IFS= read -r -d '' json; do > jq '.name' <<< "$json" > done < <(jq -n --raw-output0 '{name:"a b c"},{name:"d\ne\nf"}') "a b c" "d\ne\nf" # also it's an error to output a string containing a NUL when using NUL separator $ jq -n --raw-output0 '"\u0000"' jq: error (at ): Cannot dump a string containing NUL with --raw-output0 option ``` - Fix assert crash and validate JSON for `--jsonarg`. @wader #2658 - Remove deprecated `--argfile` option. @itchyny #2768 - Enable stack protection. @nicowilliams #2801 ##### Language changes - Use decimal number literals to preserve precision. Comparison operations respects precision but arithmetic operations might truncate. @leonid-s-usov #1752 ```sh # precision is preserved $ echo '1000000 _[Truncated at 4000 characters — full notes: https://github.com/jqlang/jq/releases/tag/jq-1.7rc2]_ ### jq-1.7rc1 — jq 1.7rc1 - Date: 2023-07-31 - Version: jq-1.7rc1 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.7rc1 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.7rc1 - Labels: Pre-release - **added** — Make object key color configurable using JQ_COLORS environment variable - **added** — Respect NO_COLOR environment variable to disable color output - **added** — Last output value can now control exit code using --exit-code/-e flag - **added** — Add --binary/-b flag on Windows for binary output with \n instead of \r\n line endings - **added** — Add --raw-output0 flag for NUL (zero byte) separated output - **added** — Add new builtin pick(stream) to emit a projection of the input object or array - **added** — Add new builtin debug(msgs) that applies a filter on the input before writing to stderr - **added** — Add new builtin scan($re; $flags) for pattern matching with flags - **added** — Add new builtin abs to get absolute value of numbers - **added** — Allow if without else-branch, which defaults to identity - **added** — Allow use of $binding as key in object literals without parentheses - **added** — Allow dot between chained indexes when using ["index"] notation - **changed** — Use decimal number literals to preserve precision in comparisons - **changed** — Improved --help output with all options and better order - **changed** — CI, scan builds, and release builds now use GitHub Actions - **changed** — Docker images now available from ghcr.io/jqlang/jq instead of Docker Hub - **removed** — Remove deprecated --argfile option - **fixed** — Fix assert crash and validate JSON for --jsonarg Note that this is a pre-release. Feedback is welcome #2802. --- After a five year hiatus we're back with a GitHub organization, with new admins and new maintainers who have brought a great deal of energy to make a long-awaited and long-needed new release. Since the last stable release many things have happened: - jq now lives at - New maintainers, admins, and owners have been recruited. - A list of [current maintainers](https://github.com/jqlang/jq/blob/70bbd10b0b58e797d03963264fc934879bb44454/AUTHORS#L4-L13) - CI, scan builds, release builds etc now use GitHub actions. @owenthereal #2596 #2620 - Lots of documentation improvements and fixes. - Web site updated with new auto complete, better section ids for linking, dark mode, etc. @itchyny #2628 - Release builds for: - Linux `amd64`, `arm64`, `armel`, `armhf`, `i386`, `mips`, `mips64`, `mips64el`, `mips64r6`, `mips64r6el`, `mipsel`, `mipsr6`, `mipsr6el`, `powerpc`, `ppc64el`, `riscv64` and `s390x` - macOS `amd64` and `arm64` - Windows `i386` and `amd64` - Docker `linux/386`, `linux/amd64`, `linux/arm64`, `linux/mips64le`, `linux/ppc64le`, `linux/riscv64` and `linux/s390x` - More details see @owenthereal #2665 - Docker images are now available from `ghcr.io/jqlang/jq` instead of docker hub. @itchyny #2652 - OSS-fuzz. @DavidKorczynski #2760 #2762 Full commit log can be found at but here are some highlights: ##### CLI changes - Make object key color configurable using `JQ_COLORS` environment variable. @itchyny @haguenau @ericpruitt #2703 ```sh # this would make "field" yellow (33, the last value) $ JQ_COLORS="1;30:0;37:0;37:0;37:0;32:1;37:1;37:1;33" ./jq -n '{field: 123}' { "field": 123 } ``` - Respect `NO_COLOR` environment variable to disable color output. See for details. @itchyny #2728 - Improved `--help` output. Now mentions all options and nicer order. @itchyny #2747 #2766 - Last output value can now control exit code using `--exit-code`/`-e`. @ryo1kato #1697 ```sh # true-ish last output value exits with zero $ jq -ne true ; echo $? true 0 # false-ish last output value (false and null) exits with 1 $ jq -ne false ; echo $? false 1 # no output value exists with 4 $ jq -ne empty ; echo $? 4 ``` - Add `--binary`/`-b` on Windows for binary output. To get `\n` instead of `\r\n` line endings. 0dab2b1 @nicowilliams - Add `--raw-output0` for NUL (zero byte) separated output. @asottile @pabs3 @itchyny #1990 #2235 #2684 ```sh # will output a zero byte after each output $ jq -n --raw-output0 '1,2,3' | xxd 00000000: 3100 3200 3300 1.2.3. # can be used with xargs -0 $ jq -n --raw-output0 '"a","b","c"' | xargs -0 -n1 a b c $ jq -n --raw-output0 '"a b c", "d\ne\nf"' | xargs -0 printf '%q\n' 'a b c' 'd'$'\n''e'$'\n''f' # can be used with read -d '' $ while IFS= read -r -d '' json; do > jq '.name' <<< "$json" > done < <(jq -n --raw-output0 '{name:"a b c"},{name:"d\ne\nf"}') "a b c" "d\ne\nf" # also it's an error to output a string containing a NUL when using NUL separator $ jq -n --raw-output0 '"\u0000"' jq: error (at ): Cannot dump a string containing NUL with --raw-output0 option ``` - Fix assert crash and validate JSON for `--jsonarg`. @wader #2658 - Remove deprecated `--argfile` option. @itchyny #2768 ##### Language changes - Use decimal number literals to preserve precision. Comparison operations respects precision but arithmetic operations might truncate. @leonid-s-usov #1752 ```sh # precision is preserved $ jq -n '100000000000000000' 100000000000000000 # comparison respects precision (this is false in JavaScript) $ jq -n '100000000000000000 < 100000000000000001' true # arithmetic operations might truncate (same as Java _[Truncated at 4000 characters — full notes: https://github.com/jqlang/jq/releases/tag/jq-1.7rc1]_ ### jq-1.6 — jq 1.6 - Date: 2018-11-02 - Version: jq-1.6 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.6 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.6 - **added** — Destructuring alternation - **added** — builtins/0 builtin - **added** — stderr/0 builtin - **added** — halt/0 and halt_error/1 builtins - **added** — isempty/1 builtin - **added** — walk/1 builtin - **added** — utf8bytelength/1 builtin - **added** — localtime/0 and strflocaltime/1 builtins - **added** — SQL-style builtins - **added** — Support for ASAN and UBSAN - **added** — Easier use of jq with shebangs - **added** — $ENV builtin variable to access environment variables - **added** — JQ_COLORS environment variable for configuring output colors - **fixed** — Calling jq without a program argument now always assumes . for the program, regardless of stdin/stdout - **fixed** — Make sorting stable regardless of qsort implementation - **added** — Local oniguruma submodule and ./configure --with-oniguruma=builtin option for easier oniguruma support - **changed** — Oniguruma can now be built as a builtin on systems where system-level libraries cannot be installed ##### New in this release since 1.5: - Destructuring Alternation - New Builtins: - `builtins/0` - `stderr/0` - `halt/0, halt_error/1` - `isempty/1` - `walk/1` - `utf8bytelength/1` - `localtime/0, strflocaltime/1` - SQL-style builtins - and more! - Add support for ASAN and UBSAN - Make it easier to use jq with shebangs (8f6f28c) - Add `$ENV` builtin variable to access environment - Add `JQ_COLORS` env var for configuring the output colors ##### Bug fixes: - Calling `jq` without a program argument now always assumes `.` for the program, regardless of stdin/stdout. (5fe0536) - Make sorting stable regardless of qsort. (7835a72) - Adds a local oniguruma submodule and the `./configure --with-oniguruma=builtin` option to make it easier to build with oniguruma support on systems where you can't install system-level libraries. (c6374b6 and 02bad4b) - And much more! ### jq-1.5 — jq 1.5 - Date: 2015-08-16 - Version: jq-1.5 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.5 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.5 - **added** — Regexp support using Oniguruma - **added** — Module system with import and include directives for namespace management - **added** — Destructuring syntax for pattern matching in variable assignments - **added** — Math functions - **added** — Online streaming parser - **added** — Minimal I/O builtins including inputs and debug - **added** — Try/catch error handling - **added** — Lexical non-local exit system with label and break - **added** — Tail call optimization for efficient recursion - **added** — Control structure builtins including while, repeat, and until - **added** — Enhanced reduce with foreach for iterative operations - **added** — Ability to read module data files in JSON format - **added** — --argjson flag to pass JSON arguments - **added** — --slurpfile flag to read JSON from files - **added** — Support for application/json-seq RFC7464 - **added** — Utility functions including bsearch for binary searching arrays - **added** — Datetime functions - **changed** — def($a): syntax now allowed as equivalent to def(a): a as $a | - **deprecated** — --argfile form replaced by --slurpfile but remains for backward compatibility - **changed** — Performance enhancements Thanks to the 20+ developers who have sent us PRs since 1.4, and the many contributors to issues and the wiki. The manual for jq 1.5 can be found at https://stedolan.github.io/jq/manual/v1.5/ Salient new features since 1.4: - regexp support (using Oniguruma)! - a proper module system `import "foo/bar" as bar; # import foo/bar.jq's defs into a bar::* namespace` and `include "foo/bar"; # import foo/bar.jq's defs into the top-level` - destructuring syntax (`. as [$first, $second, {$foo, $bar}] | ...`) - math functions - an online streaming parser - minimal I/O builtions (`inputs`, `debug`) One can now write: `jq -n 'reduce inputs as $i ( ... )'` to reduce inputs in an online way without having to slurp them first! This works with streaming too. - try/catch, for catching and handling errors (this makes for a dynamic non-local exit system) - a lexical non-local exit system One can now say `label $foo | ..... | break $foo` where the break causes control to return to the label $foo, which then produces `empty` (backtracks). There's named and anonymous labels. - tail call optimization (TCO), which allows efficient recursion in jq - a variety of new control structure builtins (e.g., `while(cond; exp)`, `repeat(exp)`, `until(cond; next)`), many of which internally use TCO - an enhanced form of `reduce`: `foreach exp as $name (init_exp; update_exp; extract_exp)` - the ability to read module data files `import "foo/bar" as $bar; # read foo/bar.json, bind to $bar::bar` - `--argjson var ''` Using --arg var bit me too many times :) - `--slurpfile var "filename"` Replaces the `--argfile` form (which is now deprecated but remains for backward compatibility). - support for application/json-seq (RFC7464) - a large variety of new utility functions, many being community contributions (e.g., `bsearch`, for binary searching arrays) - datetime functions - a variety of performance enhancements - `def($a): ...;` is now allowed as an equivalent of `def(a): a as $a | ...;` - test and build improvements, including gcov support Lastly, don't forget the wiki! The wiki has a lot of new content since 1.4, much of it contributed by the community. ### jq-1.5rc2 — jq 1.5 release candidate 2 - Date: 2015-07-27 - Version: jq-1.5rc2 - Original notes: https://github.com/jqlang/jq/releases/tag/jq-1.5rc2 - Permalink: https://whatsnew.fyi/product/jq/releases/jq-1.5rc2 - Labels: Pre-release - **added** — regexp support using Oniguruma - **added** — module system with import and include statements for namespaced definitions - **added** — destructuring syntax for pattern matching in variable binding - **added** — math functions - **added** — online streaming parser - **added** — minimal I/O builtins including inputs and debug - **added** — try/catch for error handling and dynamic non-local exits - **added** — lexical non-local exit system with label and break - **added** — tail call optimization for efficient recursion - **added** — new control structure builtins including while, repeat, and until - **added** — enhanced reduce syntax with foreach expression - **added** — ability to read module data files in JSON format - **added** — --argjson var option to pass JSON text as arguments - **added** — --slurpfile var option to read JSON from files - **added** — support for application/json-seq RFC7464 format - **added** — bsearch builtin for binary searching arrays - **added** — datetime functions - **added** — def($a) syntax as shorthand for def(a): a as $a - **deprecated** — --argfile form is deprecated in favor of --slurpfile - **changed** — performance enhancements across various operations Thanks to the 20+ developers who have sent us PRs since 1.4, and the many contributors to issues and the wiki. We're nearing a 1.5 release, finally. Salient new features since 1.4: - regexp support (using Oniguruma)! - a proper module system `import "foo/bar" as bar; # import foo/bar.jq's defs into a bar::* namespace` and `include "foo/bar"; # import foo/bar.jq's defs into the top-level` - destructuring syntax (`. as [$first, $second, {$foo, $bar}] | ...`) - math functions - an online streaming parser - minimal I/O builtions (`inputs`, `debug`) One can now write: `jq -n 'reduce inputs as $i ( ... )'` to reduce inputs in an online way without having to slurp them first! This works with streaming too. - try/catch, for catching and handling errors (this makes for a dynamic non-local exit system) - a lexical non-local exit system One can now say `label $foo | ..... | break $foo` where the break causes control to return to the label $foo, which then produces `empty` (backtracks). There's named and anonymous labels. - tail call optimization (TCO), which allows efficient recursion in jq - a variety of new control structure builtins (e.g., `while(cond; exp)`, `repeat(exp)`, `until(cond; next)`), many of which internally use TCO - an enhanced form of `reduce`: `foreach exp as $name (init_exp; update_exp; extract_exp)` - the ability to read module data files `import "foo/bar" as $bar; # read foo/bar.json, bind to $bar::bar` - `--argjson var ''` Using --arg var bit me too many times :) - `--slurpfile var "filename"` Replaces the `--argfile` form (which is now deprecated but remains for backward compatibility). - support for application/json-seq (RFC7464) - a large variety of new utility functions, many being community contributions (e.g., `bsearch`, for binary searching arrays) - datetime functions - a variety of performance enhancements - `def($a): ...;` is now allowed as an equivalent of `def(a): a as $a | ...;` - test and build improvements, including gcov support Lastly, don't forget the wiki! The wiki has a lot of new content since 1.4, much of it contributed by the community.