Skip to content
Myr

Update URLs from stedolan to jqlang

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Stephen Dolan · committed by Stephen Dolan · parent eb610c0 · Browse files · 19 files+490 added−265 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

19 files+490 added−265 removed

  • other:+490 added−265 removed

19 files+490 added−265 removed

modified:docs/content/download/default.yml+34 added-34 removed
33 unmodified lines
34 [Arch](https://www.archlinux.org/packages/?sort=&q=jq&maintainer=&flagged=)35 repository. Install using `sudo pacman -S jq`.3637 * jq 1.6 binaries for38 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64)38 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64)39 or40 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux32).40 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux32).4142 * jq 1.5 binaries for43 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64)43 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux64)44 or45 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux32).45 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux32).4647 * jq 1.4 binaries for48 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86_64)48 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-linux-x86_64)49 or50 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86).50 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-linux-x86).5152 * jq 1.3 binaries for53 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-linux-x86_64)53 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-linux-x86_64)54 or55 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-linux-x86).55 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-linux-x86).5657 ### OS X5859 * Use [Fink](https://finkproject.org) to install jq 1.6 with
5 unmodified lines
65 * Use [MacPorts](https://www.macports.org) to install jq 1.6 with66 `port install jq`.6768 * jq 1.6 binary for69 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64).69 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-osx-amd64).7071 * jq 1.5 binary for72 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64).72 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-osx-amd64).7374 * jq 1.4 binaries for75 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-osx-x86_64)75 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-osx-x86_64)76 or77 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-osx-x86).77 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-osx-x86).7879 * jq 1.3 binaries for80 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-osx-x86_64)80 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-osx-x86_64)81 or82 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-osx-x86).82 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-osx-x86).8384 ### FreeBSD8586 * `pkg install jq` as root installs a pre-built
9 unmodified lines
96 * `pkgutil -i jq` in [OpenCSW](https://www.opencsw.org/p/jq) for Solaris97 10+, Sparc and x86.9899 * jq 1.4 binaries for Solaris 11100 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-solaris11-64)100 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-solaris11-64)101 or102 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-solaris11-32).102 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-solaris11-32).103104 ### Windows105106 * Use [Chocolatey NuGet](https://chocolatey.org/) to install jq 1.6 with107 `chocolatey install jq`.108109 * jq 1.6 executables for110 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe)110 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-win64.exe)111 or112 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win32.exe).112 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-win32.exe).113114 * jq 1.5 executables for115 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-win64.exe)115 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-win64.exe)116 or117 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-win32.exe).117 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-win32.exe).118119 * jq 1.4 executables for120 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-win64.exe)120 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-win64.exe)121 or122 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.4/jq-win32.exe).122 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-win32.exe).123124 * jq 1.3 executables for125 [64-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-win64.exe)125 [64-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-win64.exe)126 or127 [32-bit](https://github.com/stedolan/jq/releases/download/jq-1.3/jq-win32.exe).127 [32-bit](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-win32.exe).128129 ### Checksums and signatures130131 SHA-256 checksums are provided for all release and pre-release binaries.132 They can be found under133 [sig/v1.x/sha256sum.txt](https://github.com/stedolan/jq/tree/master/sig).133 [sig/v1.x/sha256sum.txt](https://github.com/jqlang/jq/tree/master/sig).134 The checksums for jq 1.6 are in135 [sig/v1.6/sha256sum.txt](https://raw.githubusercontent.com/stedolan/jq/master/sig/v1.6/sha256sum.txt).135 [sig/v1.6/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.6/sha256sum.txt).136 The checksums for jq 1.5 are in137 [sig/v1.5/sha256sum.txt](https://raw.githubusercontent.com/stedolan/jq/master/sig/v1.5/sha256sum.txt).137 [sig/v1.5/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.5/sha256sum.txt).138139 Additionally, all binaries are signed by the140 [jq Package Signing Key](https://raw.githubusercontent.com/stedolan/jq/master/sig/jq-release.key).140 [jq Package Signing Key](https://raw.githubusercontent.com/jqlang/jq/master/sig/jq-release.key).141 The signatures can be found under142 [sig/v1.x/\*.asc](https://github.com/stedolan/jq/tree/master/sig).142 [sig/v1.x/\*.asc](https://github.com/jqlang/jq/tree/master/sig).143 The signatures for jq 1.6 are in144 [sig/v1.5/\*.asc](https://github.com/stedolan/jq/tree/master/sig/v1.6).144 [sig/v1.5/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.6).145 The signatures for jq 1.5 are in146 [sig/v1.5/\*.asc](https://github.com/stedolan/jq/tree/master/sig/v1.5).146 [sig/v1.5/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.5).147 You can use [GnuPG](https://gnupg.org/) to verify a signature by downloading148 the signature and running `gpg --verify signature.asc`.149150 ### From source on Linux, OS X, Cygwin, and other POSIX-like operating systems151152 * [Source tarball for jq 1.6](https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz)153 * [Source tarball for jq 1.5](https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz)152 * [Source tarball for jq 1.6](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-1.6.tar.gz)153 * [Source tarball for jq 1.5](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-1.5.tar.gz)154155 You can build it using the usual `./configure && make && sudo156 make install` rigmarole.157158 If you're interested in using the lastest development version, try:159160 git clone --recursive https://github.com/stedolan/jq.git160 git clone --recursive https://github.com/jqlang/jq.git161 cd jq162 autoreconf -i163 ./configure --disable-maintainer-mode164 make
36 unmodified lines
modified:docs/content/manual/v1.3/manual.yml+1 added-1 removed
61 unmodified lines
62 ## BUGS6364 Presumably. Report them or discuss them at:6566 https://github.com/stedolan/jq/issues66 https://github.com/jqlang/jq/issues6768 ## AUTHOR6970 Stephen Dolan `<mu@netsoc.tcd.ie>`
1200 unmodified lines
modified:docs/content/manual/v1.4/manual.yml+1 added-1 removed
61 unmodified lines
62 ## BUGS6364 Presumably. Report them or discuss them at:6566 https://github.com/stedolan/jq/issues66 https://github.com/jqlang/jq/issues6768 ## AUTHOR6970 Stephen Dolan `<mu@netsoc.tcd.ie>`
1602 unmodified lines
modified:docs/content/manual/v1.5/manual.yml+1 added-1 removed
63 unmodified lines
64 ## BUGS6566 Presumably. Report them or discuss them at:6768 https://github.com/stedolan/jq/issues68 https://github.com/jqlang/jq/issues6970 ## AUTHOR7172 Stephen Dolan `<mu@netsoc.tcd.ie>`
2806 unmodified lines
modified:docs/content/manual/v1.6/manual.yml+1 added-1 removed
63 unmodified lines
64 ## BUGS6566 Presumably. Report them or discuss them at:6768 https://github.com/stedolan/jq/issues68 https://github.com/jqlang/jq/issues6970 ## AUTHOR7172 Stephen Dolan `<mu@netsoc.tcd.ie>`
3217 unmodified lines
modified:docs/content/manual/manual.yml+1 added-1 removed
64 unmodified lines
65 ## BUGS6667 Presumably. Report them or discuss them at:6869 https://github.com/stedolan/jq/issues69 https://github.com/jqlang/jq/issues7071 ## AUTHOR7273 Stephen Dolan `<mu@netsoc.tcd.ie>`
3315 unmodified lines
modified:docs/content/tutorial/default.yml+142 added-132 removed
3 unmodified lines
45 GitHub has a JSON API, so let's play with that. This URL gets us the last6 5 commits from the jq repo.78 - command: "curl 'https://api.github.com/repos/stedolan/jq/commits?per_page=5'"8 - command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5'"9 result: |10 [11 {12 "sha": "d25341478381063d1c76e81b3a52e0592a7c997f",12 "sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",13 "node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",14 "commit": {15 "author": {15 "name": "Stephen Dolan",16 "email": "mu@netsoc.tcd.ie",17 "date": "2013-06-22T16:30:59Z"16 "name": "Mattias Wadman",17 "email": "mattias.wadman@gmail.com",18 "date": "2021-06-09T14:02:22Z"19 },20 "committer": {20 "name": "Stephen Dolan",21 "email": "mu@netsoc.tcd.ie",22 "date": "2013-06-22T16:30:59Z"21 "name": "Nico Williams",22 "email": "nico@cryptonector.com",23 "date": "2022-05-26T21:04:32Z"24 },24 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",25 "message": "docs: Document repeat(exp)",26 "tree": {26 "sha": "6ab697a8dfb5a96e124666bf6d6213822599fb40",27 "url": "https://api.github.com/repos/stedolan/jq/git/trees/6ab697a8dfb5a96e124666bf6d6213822599fb40"27 "sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",28 "url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"29 },29 "url": "https://api.github.com/repos/stedolan/jq/git/commits/d25341478381063d1c76e81b3a52e0592a7c997f",30 "comment_count": 030 "url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",31 "comment_count": 0,32 "verification": {33 "verified": false,34 "reason": "unsigned",35 "signature": null,36 "payload": null37 }38 },32 "url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f",33 "html_url": "https://github.com/stedolan/jq/commit/d25341478381063d1c76e81b3a52e0592a7c997f",34 "comments_url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f/comments",39 "url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",40 "html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",41 "comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",42 "author": {36 "login": "stedolan",43 ...4445 - text: |46
1 unmodified line
48 helpful to pipe the response through jq to pretty-print it. The simplest49 jq program is the expression `.`, which takes the input and produces it50 unchanged as output.5146 - command: "curl 'https://api.github.com/repos/stedolan/jq/commits?per_page=5' | jq '.'"52 - command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5' | jq '.'"53 result: |54 [55 {50 "sha": "d25341478381063d1c76e81b3a52e0592a7c997f",56 "sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",57 "node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",58 "commit": {59 "author": {53 "name": "Stephen Dolan",54 "email": "mu@netsoc.tcd.ie",55 "date": "2013-06-22T16:30:59Z"60 "name": "Mattias Wadman",61 "email": "mattias.wadman@gmail.com",62 "date": "2021-06-09T14:02:22Z"63 },64 "committer": {58 "name": "Stephen Dolan",59 "email": "mu@netsoc.tcd.ie",60 "date": "2013-06-22T16:30:59Z"65 "name": "Nico Williams",66 "email": "nico@cryptonector.com",67 "date": "2022-05-26T21:04:32Z"68 },62 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",69 "message": "docs: Document repeat(exp)",70 "tree": {64 "sha": "6ab697a8dfb5a96e124666bf6d6213822599fb40",65 "url": "https://api.github.com/repos/stedolan/jq/git/trees/6ab697a8dfb5a96e124666bf6d6213822599fb40"71 "sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",72 "url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"73 },67 "url": "https://api.github.com/repos/stedolan/jq/git/commits/d25341478381063d1c76e81b3a52e0592a7c997f",68 "comment_count": 074 "url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",75 "comment_count": 0,76 "verification": {77 "verified": false,78 "reason": "unsigned",79 "signature": null,80 "payload": null81 }82 },70 "url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f",71 "html_url": "https://github.com/stedolan/jq/commit/d25341478381063d1c76e81b3a52e0592a7c997f",72 "comments_url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f/comments",83 "url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",84 "html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",85 "comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",86 "author": {74 "login": "stedolan",87 ...8889 - text: |9091 We can use jq to extract just the first commit.9281 - command: "curl 'https://api.github.com/repos/stedolan/jq/commits?per_page=5' | jq '.[0]'"93 - command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5' | jq '.[0]'"94 result: |95 {84 "sha": "d25341478381063d1c76e81b3a52e0592a7c997f",96 "sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",97 "node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",98 "commit": {99 "author": {87 "name": "Stephen Dolan",88 "email": "mu@netsoc.tcd.ie",89 "date": "2013-06-22T16:30:59Z"100 "name": "Mattias Wadman",101 "email": "mattias.wadman@gmail.com",102 "date": "2021-06-09T14:02:22Z"103 },104 "committer": {92 "name": "Stephen Dolan",93 "email": "mu@netsoc.tcd.ie",94 "date": "2013-06-22T16:30:59Z"105 "name": "Nico Williams",106 "email": "nico@cryptonector.com",107 "date": "2022-05-26T21:04:32Z"108 },96 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",109 "message": "docs: Document repeat(exp)",110 "tree": {98 "sha": "6ab697a8dfb5a96e124666bf6d6213822599fb40",99 "url": "https://api.github.com/repos/stedolan/jq/git/trees/6ab697a8dfb5a96e124666bf6d6213822599fb40"111 "sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",112 "url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"113 },101 "url": "https://api.github.com/repos/stedolan/jq/git/commits/d25341478381063d1c76e81b3a52e0592a7c997f",102 "comment_count": 0114 "url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",115 "comment_count": 0,116 "verification": {117 "verified": false,118 "reason": "unsigned",119 "signature": null,120 "payload": null121 }122 },104 "url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f",105 "html_url": "https://github.com/stedolan/jq/commit/d25341478381063d1c76e81b3a52e0592a7c997f",106 "comments_url": "https://api.github.com/repos/stedolan/jq/commits/d25341478381063d1c76e81b3a52e0592a7c997f/comments",123 "url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",124 "html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",125 "comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",126 "author": {108 "login": "stedolan",109 "id": 79765,110 "avatar_url": "https://avatars.githubusercontent.com/u/79765?v=3",127 "login": "wader",128 "id": 185566,129 "node_id": "MDQ6VXNlcjE4NTU2Ng==",130 "avatar_url": "https://avatars.githubusercontent.com/u/185566?v=4",131 "gravatar_id": "",112 "url": "https://api.github.com/users/stedolan",113 "html_url": "https://github.com/stedolan",114 "followers_url": "https://api.github.com/users/stedolan/followers",115 "following_url": "https://api.github.com/users/stedolan/following{/other_user}",116 "gists_url": "https://api.github.com/users/stedolan/gists{/gist_id}",117 "starred_url": "https://api.github.com/users/stedolan/starred{/owner}{/repo}",118 "subscriptions_url": "https://api.github.com/users/stedolan/subscriptions",119 "organizations_url": "https://api.github.com/users/stedolan/orgs",120 "repos_url": "https://api.github.com/users/stedolan/repos",121 "events_url": "https://api.github.com/users/stedolan/events{/privacy}",122 "received_events_url": "https://api.github.com/users/stedolan/received_events",132 "url": "https://api.github.com/users/wader",133 "html_url": "https://github.com/wader",134 "followers_url": "https://api.github.com/users/wader/followers",135 "following_url": "https://api.github.com/users/wader/following{/other_user}",136 "gists_url": "https://api.github.com/users/wader/gists{/gist_id}",137 "starred_url": "https://api.github.com/users/wader/starred{/owner}{/repo}",138 "subscriptions_url": "https://api.github.com/users/wader/subscriptions",139 "organizations_url": "https://api.github.com/users/wader/orgs",140 "repos_url": "https://api.github.com/users/wader/repos",141 "events_url": "https://api.github.com/users/wader/events{/privacy}",142 "received_events_url": "https://api.github.com/users/wader/received_events",143 "type": "User",144 "site_admin": false145 },146 "committer": {127 "login": "stedolan",128 "id": 79765,129 "avatar_url": "https://avatars.githubusercontent.com/u/79765?v=3",147 "login": "nicowilliams",148 "id": 604851,149 "node_id": "MDQ6VXNlcjYwNDg1MQ==",150 "avatar_url": "https://avatars.githubusercontent.com/u/604851?v=4",151 "gravatar_id": "",131 "url": "https://api.github.com/users/stedolan",132 "html_url": "https://github.com/stedolan",133 "followers_url": "https://api.github.com/users/stedolan/followers",134 "following_url": "https://api.github.com/users/stedolan/following{/other_user}",135 "gists_url": "https://api.github.com/users/stedolan/gists{/gist_id}",136 "starred_url": "https://api.github.com/users/stedolan/starred{/owner}{/repo}",137 "subscriptions_url": "https://api.github.com/users/stedolan/subscriptions",138 "organizations_url": "https://api.github.com/users/stedolan/orgs",139 "repos_url": "https://api.github.com/users/stedolan/repos",140 "events_url": "https://api.github.com/users/stedolan/events{/privacy}",141 "received_events_url": "https://api.github.com/users/stedolan/received_events",152 "url": "https://api.github.com/users/nicowilliams",153 "html_url": "https://github.com/nicowilliams",154 "followers_url": "https://api.github.com/users/nicowilliams/followers",155 "following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",156 "gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",157 "starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",158 "subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",159 "organizations_url": "https://api.github.com/users/nicowilliams/orgs",160 "repos_url": "https://api.github.com/users/nicowilliams/repos",161 "events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",162 "received_events_url": "https://api.github.com/users/nicowilliams/received_events",163 "type": "User",164 "site_admin": false165 },166 "parents": [167 {147 "sha": "54b9c9bdb225af5d886466d72f47eafc51acb4f7",148 "url": "https://api.github.com/repos/stedolan/jq/commits/54b9c9bdb225af5d886466d72f47eafc51acb4f7",149 "html_url": "https://github.com/stedolan/jq/commit/54b9c9bdb225af5d886466d72f47eafc51acb4f7"150 },151 {152 "sha": "8b1b503609c161fea4b003a7179b3fbb2dd4345a",153 "url": "https://api.github.com/repos/stedolan/jq/commits/8b1b503609c161fea4b003a7179b3fbb2dd4345a",154 "html_url": "https://github.com/stedolan/jq/commit/8b1b503609c161fea4b003a7179b3fbb2dd4345a"168 "sha": "f2ad9517c72f6267ae317639ab56bbfd4a8653d4",169 "url": "https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4",170 "html_url": "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"171 }172 ]173 }174
7 unmodified lines
182183 - command: "jq '.[0] | {message: .commit.message, name: .commit.committer.name}'"184 result: |185 {170 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",171 "name": "Stephen Dolan"186 "message": "docs: Document repeat(exp)",187 "name": "Nico Williams"188 }189190 - text: |191
6 unmodified lines
198199 - command: "jq '.[] | {message: .commit.message, name: .commit.committer.name}'"200 result: |201 {186 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",187 "name": "Stephen Dolan"202 "message": "docs: Document repeat(exp)",203 "name": "Nico Williams"204 }205 {190 "message": "Reject all overlong UTF8 sequences.",191 "name": "Stephen Dolan"206 "message": "Mention -n in IO-section and for input/inputs",207 "name": "Nico Williams"208 }209 {194 "message": "Fix various UTF8 parsing bugs.\n\nIn particular, parse bad UTF8 by replacing the broken bits with U+FFFD\nand resychronise correctly after broken sequences.",195 "name": "Stephen Dolan"210 "message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",211 "name": "Nico Williams"212 }213 {198 "message": "Fix example in manual for `floor`. See #155.",199 "name": "Stephen Dolan"214 "message": "docs: point to Libera.Chat instead of Freenode",215 "name": "Nico Williams"216 }217 {202 "message": "Document floor",203 "name": "Nicolas Williams"218 "message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",219 "name": "Nico Williams"220 }221222 - text: |223
16 unmodified lines
240 - command: "jq '[.[] | {message: .commit.message, name: .commit.committer.name}]'"241 result: |242 [243 {228 "message": "Merge pull request #163 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",229 "name": "Stephen Dolan"244 "message": "docs: Document repeat(exp)",245 "name": "Nico Williams"246 },247 {232 "message": "Reject all overlong UTF8 sequences.",233 "name": "Stephen Dolan"248 "message": "Mention -n in IO-section and for input/inputs",249 "name": "Nico Williams"250 },251 {236 "message": "Fix various UTF8 parsing bugs.\n\nIn particular, parse bad UTF8 by replacing the broken bits with U+FFFD\nand resychronise correctly after broken sequences.",237 "name": "Stephen Dolan"252 "message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",253 "name": "Nico Williams"254 },255 {240 "message": "Fix example in manual for `floor`. See #155.",241 "name": "Stephen Dolan"256 "message": "docs: point to Libera.Chat instead of Freenode",257 "name": "Nico Williams"258 },259 {244 "message": "Document floor",245 "name": "Nicolas Williams"260 "message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",261 "name": "Nico Williams"262 }263 ]264265 - text: |
5 unmodified lines
271 about "parent" commits. There can be one or many.272273 "parents": [274 {259 "sha": "54b9c9bdb225af5d886466d72f47eafc51acb4f7",260 "url": "https://api.github.com/repos/stedolan/jq/commits/54b9c9bdb225af5d886466d72f47eafc51acb4f7",261 "html_url": "https://github.com/stedolan/jq/commit/54b9c9bdb225af5d886466d72f47eafc51acb4f7"262 },263 {264 "sha": "8b1b503609c161fea4b003a7179b3fbb2dd4345a",265 "url": "https://api.github.com/repos/stedolan/jq/commits/8b1b503609c161fea4b003a7179b3fbb2dd4345a",266 "html_url": "https://github.com/stedolan/jq/commit/8b1b503609c161fea4b003a7179b3fbb2dd4345a"275 "sha": "f2ad9517c72f6267ae317639ab56bbfd4a8653d4",276 "url": "https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4",277 "html_url": "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"278 }279 ]280281 We want to pull out all of the "html_url" fields inside that array of parent
3 unmodified lines
285 - command: "jq '[.[] | {message: .commit.message, name: .commit.committer.name, parents: [.parents[].html_url]}]'"286 result: |287 [288 {278 "message": "Merge pull request #162 from stedolan/utf8-fixes\n\nUtf8 fixes. Closes #161",279 "name": "Stephen Dolan",289 "message": "docs: Document repeat(exp)",290 "name": "Nico Williams",291 "parents": [281 "https://github.com/stedolan/jq/commit/54b9c9bdb225af5d886466d72f47eafc51acb4f7",282 "https://github.com/stedolan/jq/commit/8b1b503609c161fea4b003a7179b3fbb2dd4345a"292 "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"293 ]294 },295 {286 "message": "Reject all overlong UTF8 sequences.",287 "name": "Stephen Dolan",296 "message": "Mention -n in IO-section and for input/inputs",297 "name": "Nico Williams",298 "parents": [289 "https://github.com/stedolan/jq/commit/ff48bd6ec538b01d1057be8e93b94eef6914e9ef"299 "https://github.com/jqlang/jq/commit/c4d39c4d22f2b12225ca1b311708f7e084ad9ff8"300 ]301 },302 {293 "message": "Fix various UTF8 parsing bugs.\n\nIn particular, parse bad UTF8 by replacing the broken bits with U+FFFD\nand resychronise correctly after broken sequences.",294 "name": "Stephen Dolan",303 "message": "Fix iterration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",304 "name": "Nico Williams",305 "parents": [296 "https://github.com/stedolan/jq/commit/54b9c9bdb225af5d886466d72f47eafc51acb4f7"306 "https://github.com/jqlang/jq/commit/174db0f93552bdb551ae1f3c5c64744df0ad8e2f"307 ]308 },309 {300 "message": "Fix example in manual for `floor`. See #155.",301 "name": "Stephen Dolan",310 "message": "docs: point to Libera.Chat instead of Freenode",311 "name": "Nico Williams",312 "parents": [303 "https://github.com/stedolan/jq/commit/3dcdc582ea993afea3f5503a78a77675967ecdfa"313 "https://github.com/jqlang/jq/commit/29cf77977ef52eec708982b19bf9d2ec17443337"314 ]315 },316 {307 "message": "Document floor",308 "name": "Nicolas Williams",317 "message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",318 "name": "Nico Williams",319 "parents": [310 "https://github.com/stedolan/jq/commit/7c4171d414f647ab08bcd20c76a4d8ed68d9c602"320 "https://github.com/jqlang/jq/commit/55e6e2c21829bd866bd4b18ee254b05c9020320a"321 ]322 }323 ]324
13 unmodified lines
modified:docs/content/index.yml+4 added-4 removed
modified:docs/templates/shared/_head.html.j2+1 added-1 removed
1 <head>2 <script>3 if ((window.location.host == "stedolan.github.io") && (window.location.protocol != "https:"))3 if ((window.location.host == "jqlang.github.io") && (window.location.protocol != "https:"))4 window.location.protocol = "https";5 </script>6 <meta charset="utf-8">7 <title>{{headline}}</title>
10 unmodified lines
modified:docs/templates/shared/_navbar.html.j2+3 added-3 removed
15 unmodified lines
16 <li {% if item == navitem %} class="active" {% endif %}>17 <a href="{{root}}/{{item}}/">{{item | capitalize}}</a>18 </li>19 {% endfor %}20 <li><a href="https://github.com/stedolan/jq/issues">Issues</a></li>21 <li><a href="https://github.com/stedolan/jq">Source</a></li>20 <li><a href="https://github.com/jqlang/jq/issues">Issues</a></li>21 <li><a href="https://github.com/jqlang/jq">Source</a></li>22 <li><a href="https://jqplay.org">Try online!</a></li>23 <li><a href="https://raw.githubusercontent.com/stedolan/jq/master/NEWS">News</a></li>23 <li><a href="https://raw.githubusercontent.com/jqlang/jq/master/NEWS">News</a></li>24 </ul>25 </div>26 </div>27 </div>
modified:docs/templates/index.html.j2+3 added-3 removed
22 unmodified lines
23 Download jq 1.624 <span class="caret"></span>25 </a>26 <ul class="dropdown-menu">27 <li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64">Linux (64-bit)</a></li>28 <li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64">OS X (64-bit)</a></li>29 <li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe">Windows (64-bit)</a></li>27 <li><a href="https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64">Linux (64-bit)</a></li>28 <li><a href="https://github.com/jqlang/jq/releases/download/jq-1.6/jq-osx-amd64">OS X (64-bit)</a></li>29 <li><a href="https://github.com/jqlang/jq/releases/download/jq-1.6/jq-win64.exe">Windows (64-bit)</a></li>30 <li><a href="{{root}}/download/">Other platforms, older versions, and source</a></li>31 </ul>32 </div>33
40 unmodified lines
modified:docs/build_manpage.py+1 added-1 removed
185 unmodified lines
186 pass187188def load_yml_file(fn):189 with open(fn) as f:190 return yaml.load(f)190 return yaml.load(f, Loader=yaml.Loader)191192def dedent_body(body):193 lines = [re.sub(r'^ (\S)', r'\1', l) for l in body.split('\n')]194 return '\n'.join(lines)
41 unmodified lines
modified:docs/site.yml+2 added-2 removed
1# The key value pairs found below are available within the templates.23url: https://stedolan.github.io/jq3url: https://jqlang.github.io/jq45# This line is modified by the Makefile. To change the version number,6# edit the Autoconf version number at the top of configure.ac7jq_version: "1.4-2-g15c4a7f-dirty"7jq_version: "1.6-159-gcff5336-dirty"89root: '/jq'
modified:src/main.c+2 added-2 removed
58 unmodified lines
59 "The simplest filter is ., which copies jq's input to its output\n"60 "unmodified (except for formatting, but note that IEEE754 is used\n"61 "for number representation internally, with all that that implies).\n\n"62 "For more advanced filters see the jq(1) manpage (\"man jq\")\n"63 "and/or https://stedolan.github.io/jq\n\n"63 "and/or https://jqlang.github.io/jq\n\n"64 "Example:\n\n\t$ echo '{\"foo\": 0}' | jq .\n"65 "\t{\n\t\t\"foo\": 0\n\t}\n\n",66 JQ_VERSION, progname, progname, progname);67 if (keep_it_short) {
28 unmodified lines
96}9798static void die() {99 fprintf(stderr, "Use %s --help for help with command-line options,\n", progname);100 fprintf(stderr, "or see the jq manpage, or online docs at https://stedolan.github.io/jq\n");100 fprintf(stderr, "or see the jq manpage, or online docs at https://jqlang.github.io/jq\n");101 exit(2);102}103104
621 unmodified lines
modified:configure.ac+2 added-2 removed
1 unmodified line
2 m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null &&3 (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) ||4 echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`])))56AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues],7 [jq], [https://stedolan.github.io/jq])6AC_INIT([jq], [jq_version], [https://github.com/jqlang/jq/issues],7 [jq], [https://jqlang.github.io/jq])89dnl Created autoconf implementation thompson@dtosolutions, 26NOV1210AC_PREREQ([2.64])11AC_CONFIG_AUX_DIR([config])
288 unmodified lines
modified:jq.1.prebuilt+285 added-70 removed
1.\" generated with Ronn/v0.7.32.\" http://github.com/rtomayko/ronn/tree/0.7.31.4.TH "JQ" "1" "December 2017" "" ""2.TH "JQ" "1" "May 2023" "" ""3.4.SH "NAME"5\fBjq\fR \- Command\-line JSON processor6.
6 unmodified lines
13.P14\fBjq\fR can accept text input as well, but by default, \fBjq\fR reads a stream of JSON entities (including numbers and other literals) from \fBstdin\fR\. Whitespace is only needed to separate entities such as 1 and 2, and true and false\. One or more \fIfiles\fR may be specified, in which case \fBjq\fR will read input from those instead\.15.16.P19The \fIoptions\fR are described in the \fIINVOKING JQ\fR section; they mostly concern input and output formatting\. The \fIfilter\fR is written in the jq language and specifies how to transform the input file or document\.17The \fIoptions\fR are described in the [INVOKING JQ] section; they mostly concern input and output formatting\. The \fIfilter\fR is written in the jq language and specifies how to transform the input file or document\.18.19.SH "FILTERS"20A jq program is a "filter": it takes an input, and produces an output\. There are a lot of builtin filters for extracting a particular field of an object, or converting a number to a string, or various other standard tasks\.21.
17 unmodified lines
39.40.P41You can affect how jq reads and writes its input and output using some command\-line options:42.45.IP "\(bu" 443.TP44\fB\-\-version\fR:45.46.IP47Output the jq version and exit with zero\.48.51.IP "\(bu" 449.TP50\fB\-\-seq\fR:51.52.IP53Use the \fBapplication/json\-seq\fR MIME type scheme for separating JSON texts in jq\'s input and output\. This means that an ASCII RS (record separator) character is printed before each value on output and an ASCII LF (line feed) is printed after every output\. Input JSON texts that fail to parse are ignored (but warned about), discarding all subsequent input until the next RS\. This mode also parses the output of jq without the \fB\-\-seq\fR option\.54.57.IP "\(bu" 455.TP56\fB\-\-stream\fR:57.58.IP61Parse the input in streaming fashion, outputting arrays of path and leaf values (scalars and empty arrays or empty objects)\. For example, \fB"a"\fR becomes \fB[[],"a"]\fR, and \fB[[],"a",["b"]]\fR becomes \fB[[0],[]]\fR, \fB[[1],"a"]\fR, and \fB[[1,0],"b"]\fR\.59Parse the input in streaming fashion, outputting arrays of path and leaf values (scalars and empty arrays or empty objects)\. For example, \fB"a"\fR becomes \fB[[],"a"]\fR, and \fB[[],"a",["b"]]\fR becomes \fB[[0],[]]\fR, \fB[[1],"a"]\fR, and \fB[[2,0],"b"]\fR\.60.61.IP62This is useful for processing very large inputs\. Use this in conjunction with filtering and the \fBreduce\fR and \fBforeach\fR syntax to reduce large inputs incrementally\.63.66.IP "\(bu" 464.TP65\fB\-\-slurp\fR/\fB\-s\fR:66.67.IP68Instead of running the filter for each JSON object in the input, read the entire input stream into a large array and run the filter just once\.69.72.IP "\(bu" 470.TP71\fB\-\-raw\-input\fR/\fB\-R\fR:72.73.IP74Don\'t parse the input as JSON\. Instead, each line of text is passed to the filter as a string\. If combined with \fB\-\-slurp\fR, then the entire input is passed to the filter as a single long string\.75.78.IP "\(bu" 476.TP77\fB\-\-null\-input\fR/\fB\-n\fR:78.79.IP80Don\'t read any input at all! Instead, the filter is run once using \fBnull\fR as the input\. This is useful when using jq as a simple calculator or to construct JSON data from scratch\.81.84.IP "\(bu" 482.TP83\fB\-\-compact\-output\fR / \fB\-c\fR:84.85.IP86By default, jq pretty\-prints JSON output\. Using this option will result in more compact output by instead putting each JSON object on a single line\.87.90.IP "\(bu" 488.TP89\fB\-\-tab\fR:90.91.IP92Use a tab for each indentation level instead of two spaces\.93.96.IP "\(bu" 494.TP95\fB\-\-indent n\fR:96.97.IP98Use the given number of spaces (no more than 7) for indentation\.99.102.IP "\(bu" 4100.TP101\fB\-\-color\-output\fR / \fB\-C\fR and \fB\-\-monochrome\-output\fR / \fB\-M\fR:102.103.IP104By default, jq outputs colored JSON if writing to a terminal\. You can force it to produce color even if writing to a pipe or a file using \fB\-C\fR, and disable color with \fB\-M\fR\.105.106.IP107Colors can be configured with the \fBJQ_COLORS\fR environment variable (see below)\.108.111.IP "\(bu" 4109.TP110\fB\-\-binary\fR / \fB\-b\fR:111.112.IP113Windows users using WSL, MSYS2, or Cygwin, should use this option when using a native jq\.exe, otherwise jq will turn newlines (LFs) into carriage\-return\-then\-newline (CRLF)\.114.115.TP116\fB\-\-ascii\-output\fR / \fB\-a\fR:117.118.IP119jq usually outputs non\-ASCII Unicode codepoints as UTF\-8, even if the input specified them as escape sequences (like "\eu03bc")\. Using this option, you can force jq to produce pure ASCII output with every non\-ASCII character replaced with the equivalent escape sequence\.120.117.IP "\(bu" 4118\fB\-\-unbuffered\fR121.TP122\fB\-\-unbuffered\fR:123.124.IP125Flush the output after each JSON object is printed (useful if you\'re piping a slow data source into jq and piping jq\'s output elsewhere)\.126.123.IP "\(bu" 4127.TP128\fB\-\-sort\-keys\fR / \fB\-S\fR:129.130.IP131Output the fields of each object with the keys in sorted order\.132.129.IP "\(bu" 4133.TP134\fB\-\-raw\-output\fR / \fB\-r\fR:135.136.IP137With this option, if the filter\'s result is a string then it will be written directly to standard output rather than being formatted as a JSON string with quotes\. This can be useful for making jq filters talk to non\-JSON\-based systems\.138.135.IP "\(bu" 4139.TP140\fB\-\-join\-output\fR / \fB\-j\fR:141.142.IP143Like \fB\-r\fR but jq won\'t print a newline after each output\.144.141.IP "\(bu" 4145.TP146\fB\-\-nul\-output\fR / \fB\-0\fR:147.148.IP149Like \fB\-r\fR but jq will print NUL instead of newline after each output\. This can be useful when the values being output can contain newlines\.150.151.TP152\fB\-f filename\fR / \fB\-\-from\-file filename\fR:153.154.IP155Read filter from the file rather than from a command line, like awk\'s \-f option\. You can also use \'#\' to make comments\.156.147.IP "\(bu" 4157.TP158\fB\-Ldirectory\fR / \fB\-L directory\fR:159.160.IP161Prepend \fBdirectory\fR to the search list for modules\. If this option is used then no builtin search list is used\. See the section on modules below\.162.153.IP "\(bu" 4163.TP164\fB\-e\fR / \fB\-\-exit\-status\fR:165.166.IP167Sets the exit status of jq to 0 if the last output values was neither \fBfalse\fR nor \fBnull\fR, 1 if the last output value was either \fBfalse\fR or \fBnull\fR, or 4 if no valid result was ever produced\. Normally jq exits with 2 if there was any usage problem or system error, 3 if there was a jq program compile error, or 0 if the jq program ran\.168.169.IP170Another way to set the exit status is with the \fBhalt_error\fR builtin function\.171.162.IP "\(bu" 4172.TP173\fB\-\-arg name value\fR:174.175.IP176This option passes a value to the jq program as a predefined variable\. If you run jq with \fB\-\-arg foo bar\fR, then \fB$foo\fR is available in the program and has the value \fB"bar"\fR\. Note that \fBvalue\fR will be treated as a string, so \fB\-\-arg foo 123\fR will bind \fB$foo\fR to \fB"123"\fR\.177.178.IP179Named arguments are also available to the jq program as \fB$ARGS\.named\fR\.180.171.IP "\(bu" 4181.TP182\fB\-\-argjson name JSON\-text\fR:183.184.IP185This option passes a JSON\-encoded value to the jq program as a predefined variable\. If you run jq with \fB\-\-argjson foo 123\fR, then \fB$foo\fR is available in the program and has the value \fB123\fR\.186.177.IP "\(bu" 4187.TP188\fB\-\-slurpfile variable\-name filename\fR:189.190.IP181This option reads all the JSON texts in the named file and binds an array of the parsed JSON values to the given global variable\. If you run jq with \fB\-\-argfile foo bar\fR, then \fB$foo\fR is available in the program and has an array whose elements correspond to the texts in the file named \fBbar\fR\.191This option reads all the JSON texts in the named file and binds an array of the parsed JSON values to the given global variable\. If you run jq with \fB\-\-slurpfile foo bar\fR, then \fB$foo\fR is available in the program and has an array whose elements correspond to the texts in the file named \fBbar\fR\.192.183.IP "\(bu" 4193.TP194\fB\-\-rawfile variable\-name filename\fR:195.196.IP197This option reads in the named file and binds its contents to the given global variable\. If you run jq with \fB\-\-rawfile foo bar\fR, then \fB$foo\fR is available in the program and has a string whose contents are to the texts in the file named \fBbar\fR\.198.199.TP200\fB\-\-argfile variable\-name filename\fR:201.202.IP203Do not use\. Use \fB\-\-slurpfile\fR instead\.204.205.IP206(This option is like \fB\-\-slurpfile\fR, but when the file has just one text, then that is used, else an array of texts is used as in \fB\-\-slurpfile\fR\.)207.192.IP "\(bu" 4208.TP209\fB\-\-args\fR:210.211.IP212Remaining arguments are positional string arguments\. These are available to the jq program as \fB$ARGS\.positional[]\fR\.213.198.IP "\(bu" 4214.TP215\fB\-\-jsonargs\fR:216.217.IP218Remaining arguments are positional JSON text arguments\. These are available to the jq program as \fB$ARGS\.positional[]\fR\.219.204.IP "\(bu" 4220.TP221\fB\-\-run\-tests [filename]\fR:222.223.IP224Runs the tests in the given file or standard input\. This must be the last option given and does not honor all preceding options\. The input consists of comment lines, empty lines, and program lines followed by one input line, as many lines of output as are expected (one per output), and a terminating empty line\. Compilation failure tests start with a line containing only "%%FAIL", then a line containing the program to compile, then a line containing an error message to compare to the actual\.225.226.IP227Be warned that this option can change backwards\-incompatibly\.228.213.IP "" 0214.229.SH "BASIC FILTERS"230.231.SS "Identity: \."232The absolute simplest filter is \fB\.\fR \. This is a filter that takes its input and produces it unchanged as output\. That is, this is the identity operator\.233.234.P235Since jq by default pretty\-prints all output, this trivial program can be a useful way of formatting JSON output from, say, \fBcurl\fR\.236.237.P238An important point about the identity filter is that it guarantees to preserve the literal decimal representation of values\. This is particularly important when dealing with numbers which can\'t be losslessly converted to an IEEE754 double precision representation\.239.240.P241jq doesn\'t truncate the literal numbers to double unless there is a need to make arithmetic operations with the number\. Comparisions are carried out over the untruncated big decimal representation of the number\.242.243.P244jq will also try to maintain the original decimal precision of the provided number literal\. See below for examples\. 245.246.IP "" 4247.248.nf249250jq \'\.\'251 "Hello, world!"252=> "Hello, world!"253254jq \'\. | tojson\'255 12345678909876543212345256=> "12345678909876543212345"257258jq \'map([\., \. == 1]) | tojson\'259 [1, 1\.000, 1\.0, 100e\-2]260=> "[[1,true],[1\.000,true],[1\.0,true],[1\.00,true]]"261262jq \'\. as $big | [$big, $big + 1] | map(\. > 10000000000000000000000000000000)\'263 10000000000000000000000000000001264=> [true, false]265.266.fi267.268.IP "" 0
7 unmodified lines
276.P277This syntax only works for simple, identifier\-like keys, that is, keys that are all made of alphanumeric characters and underscore, and which do not start with a digit\.278.279.P245If the key contains special characters, you need to surround it with double quotes like this: \fB\."foo$"\fR, or else \fB\.["foo$"]\fR\.280If the key contains special characters or starts with a digit, you need to surround it with double quotes like this: \fB\."foo$"\fR, or else \fB\.["foo$"]\fR\.281.282.P283For example \fB\.["foo::bar"]\fR and \fB\.["foo\.bar"]\fR work while \fB\.foo::bar\fR does not, and \fB\.foo\.bar\fR means \fB\.["foo"]\.["bar"]\fR\.284.
115 unmodified lines
400=> {"name":"JSON", "good":true}, {"name":"XML", "good":false}401402jq \'\.[]\'403 []369=>404=> 405406jq \'\.[]\'407 {"a": 1, "b": 1}408=> 1, 1
72 unmodified lines
481.482.P483Booleans, null, strings and numbers are written the same way as in javascript\. Just like everything else in jq, these simple values take an input and produce an output \- \fB42\fR is a valid jq expression that takes an input, ignores it, and returns 42 instead\.484.485.P486Numbers in jq are internally represented by their IEEE754 double precision approximation\. Any arithmetic operation with numbers, whether they are literals or results of previous filters, will produce a double precision floating point result\.487.488.P489However, when parsing a literal jq will store the original literal string\. If no mutation is applied to this value then it will make to the output in its original form, even if conversion to double would result in a loss\. 490.491.SS "Array construction: []"492As in JSON, \fB[]\fR is used to construct arrays, as in \fB[1,2,3]\fR\. The elements of the arrays can be any jq expression, including a pipeline\. All of the results produced by all of the expressions are collected into one big array\. You can use it to construct an array out of a known quantity of values (as in \fB[\.foo, \.bar, \.baz]\fR) or to "collect" all the results of a filter into an array (as in \fB[\.items[]\.name]\fR)493.494.P
21 unmodified lines
516.SS "Object Construction: {}"517Like JSON, \fB{}\fR is for constructing objects (aka dictionaries or hashes), as in: \fB{"a": 42, "b": 17}\fR\.518.519.P479If the keys are "identifier\-like", then the quotes can be left off, as in \fB{a:42, b:17}\fR\. Keys generated by expressions need to be parenthesized, e\.g\., \fB{("a"+"b"):59}\fR\.520If the keys are "identifier\-like", then the quotes can be left off, as in \fB{a:42, b:17}\fR\. Variable references as key expressions use the value of the variable as the key\. Key expressions other than constant literals, identifiers, or variable references, need to be parenthesized, e\.g\., \fB{("a"+"b"):59}\fR\.521.522.P482The value can be any expression (although you may need to wrap it in parentheses if it\'s a complicated one), which gets applied to the {} expression\'s input (remember, all filters have an input and an output)\.523The value can be any expression (although you may need to wrap it in parentheses if, for example, it contains colons), which gets applied to the {} expression\'s input (remember, all filters have an input and an output)\.524.525.IP "" 4526.527.nf
80 unmodified lines
608.609.nf610611{"stedolan": ["JQ Primer", "More JQ"]}612.613.fi614.615.IP "" 0616.617.P618Variable references as keys use the value of the variable as the key\. Without a value then the variable\'s name becomes the key and its value becomes the value,619.620.IP "" 4621.622.nf623624"f o o" as $foo | "b a r" as $bar | {$foo, $bar:$foo}625.626.fi627.628.IP "" 0629.630.P631produces632.633.IP "" 4634.635.nf636637{"f o o":"f o o","b a r":"f o o"}638639jq \'{user, title: \.titles[]}\'640 {"user":"stedolan","titles":["JQ Primer", "More JQ"]}641=> {"user":"stedolan", "title": "JQ Primer"}, {"user":"stedolan", "title": "More JQ"}642
25 unmodified lines
668.669.SH "BUILTIN OPERATORS AND FUNCTIONS"670Some jq operator (for instance, \fB+\fR) do different things depending on the type of their arguments (arrays, numbers, etc\.)\. However, jq never does implicit type conversions\. If you try to add a string to an object you\'ll get an error message and no result\.671.672.P673Please note that all numbers are converted to IEEE754 double precision floating point representation\. Arithmetic and logical operators are working with these converted doubles\. Results of all such operations are also limited to the double precision\. 674.675.P676The only exception to this behaviour of number is a snapshot of original number literal\. When a number which originally was provided as a literal is never mutated until the end of the program then it is printed to the output in its original literal form\. This also includes cases when the original literal would be truncated when converted to the IEEE754 double precision floating point number\.677.678.SS "Addition: +"679The operator \fB+\fR takes two filters, applies them both to the same input, and adds the results together\. What "adding" means depends on the types involved:680.681.IP "\(bu" 4
110 unmodified lines
792.793.IP "\(bu" 4794The length of \fBnull\fR is zero\.795.723.IP724jq \'\.[] | length\' [[1,2], "string", {"a":2}, null] => 2, 6, 1, 0796.IP "" 4797.798.nf799800jq \'\.[] | length\'801 [[1,2], "string", {"a":2}, null]802=> 2, 6, 1, 0803.804.fi805.806.IP "" 0807.808.SS "utf8bytelength"809The builtin function \fButf8bytelength\fR outputs the number of bytes used to encode a string in UTF\-8\.
308 unmodified lines
1118.P1119The given \fBexit_code\fR (defaulting to \fB5\fR) will be jq\'s exit status\.1120.1121.P1042For example, \fB"Error: something went wrong\en"|halt_error(1)\fR\.1122For example, \fB"Error: somthing went wrong\en"|halt_error(1)\fR\.1123.1124.SS "$__loc__"1125Produces an object with a "file" key and a "line" key, with the filename and line number where \fB$__loc__\fR occurs, as values\.1126.
153 unmodified lines
1280.fi1281.1282.IP "" 01283.1204.SS "range(upto), range(from;upto) range(from;upto;by)"1284.SS "range(upto), range(from;upto), range(from;upto;by)"1285The \fBrange\fR function produces a range of numbers\. \fBrange(4;10)\fR produces 6 numbers, from 4 (inclusive) to 10 (exclusive)\. The numbers are produced as separate outputs\. Use \fB[range(4;10)]\fR to get a range as an array\.1286.1287.P1288The one argument form generates numbers from 0 to the given number, with an increment of 1\.
538 unmodified lines
1827.fi1828.1829.IP "" 01830.1831.SS "repeat(exp)"1832The \fBrepeat(exp)\fR function allows you to repeatedly apply expression \fBexp\fR to \fB\.\fR until an error is raised\.1833.1834.P1835Note that \fBrepeat(exp)\fR is internally defined as a recursive jq function\. Recursive calls within \fBrepeat\fR will not consume additional memory if \fBexp\fR produces at most one output for each input\. See advanced topics below\.1836.1837.IP "" 41838.1839.nf18401841jq \'[repeat(\.*2, error)?]\'1842 11843=> [2]1844.1845.fi1846.1847.IP "" 01848.1849.SS "until(cond; next)"1850The \fBuntil(cond; next)\fR function allows you to repeatedly apply the expression \fBnext\fR, initially to \fB\.\fR then to its own output, until \fBcond\fR is true\. For example, this can be used to implement a factorial function (see below)\.1851.1852.P
137 unmodified lines
1990.1991.IP "" 01992.1993.SS "bsearch(x)"1896bsearch(x) conducts a binary search for x in the input array\. If the input is sorted and contains x, then bsearch(x) will return its index in the array; otherwise, if the array is sorted, it will return (\-1 \- ix) where ix is an insertion point such that the array would still be sorted after the insertion of x at ix\. If the array is not sorted, bsearch(x) will return an integer that is probably of no interest\.1994\fBbsearch(x)\fR conducts a binary search for x in the input array\. If the input is sorted and contains x, then \fBbsearch(x)\fR will return its index in the array; otherwise, if the array is sorted, it will return (\-1 \- ix) where ix is an insertion point such that the array would still be sorted after the insertion of x at ix\. If the array is not sorted, \fBbsearch(x)\fR will return an integer that is probably of no interest\.1995.1996.IP "" 41997.1998.nf
29 unmodified lines
2028.2029.IP "" 02030.2031.SS "Convert to/from JSON"1934The \fBtojson\fR and \fBfromjson\fR builtins dump values as JSON texts or parse JSON texts into values, respectively\. The tojson builtin differs from tostring in that tostring returns strings unmodified, while tojson encodes strings as JSON strings\.2032The \fBtojson\fR and \fBfromjson\fR builtins dump values as JSON texts or parse JSON texts into values, respectively\. The \fBtojson\fR builtin differs from \fBtostring\fR in that \fBtostring\fR returns strings unmodified, while \fBtojson\fR encodes strings as JSON strings\.2033.2034.IP "" 42035.2036.nf
68 unmodified lines
2105.TP2106\fB@base64d\fR:2107.2108.IP2011The inverse of \fB@base64\fR, input is decoded as specified by RFC 4648\. Note: If the decoded string is not UTF\-8, the results are undefined\.2109The inverse of \fB@base64\fR, input is decoded as specified by RFC 4648\. Note\e: If the decoded string is not UTF\-8, the results are undefined\.2110.2111.P2112This syntax can be combined with string interpolation in a useful way\. You can follow a \fB@foo\fR token with a string literal\. The contents of the string literal will \fInot\fR be escaped\. However, all interpolations made inside that string literal will be escaped\. For instance,2113.
171 unmodified lines
2285.SS "if\-then\-else"2286\fBif A then B else C end\fR will act the same as \fBB\fR if \fBA\fR produces a value other than false or null, but act the same as \fBC\fR otherwise\.2287.2288.P2191Checking for false or null is a simpler notion of "truthiness" than is found in Javascript or Python, but it means that you\'ll sometimes have to be more explicit about the condition you want: you can\'t test whether, e\.g\. a string is empty using \fBif \.name then A else B end\fR, you\'ll need something more like \fBif (\.name | length) > 0 then A else B end\fR instead\.2289\fBif A then B end\fR is the same as \fBif A then B else \. end\fR\. That is, the \fBelse\fR branch is optional, and if absent is the same as \fB\.\fR\.2290.2291.P2292Checking for false or null is a simpler notion of "truthiness" than is found in Javascript or Python, but it means that you\'ll sometimes have to be more explicit about the condition you want\. You can\'t test whether, e\.g\. a string is empty using \fBif \.name then A else B end\fR, you\'ll need something more like \fBif \.name == "" then A else B end\fR instead\.2293.2294.P2295If the condition \fBA\fR produces multiple results, then \fBB\fR is evaluated once for each result that is not false or null, and \fBC\fR is evaluated once for each false or null\.2296.2297.P2298More cases can be added to an if using \fBelif A then B\fR syntax\.
1 unmodified line
2300.IP "" 42301.2302.nf23032203jq \'if \. == 0 then2304jq \'if \. == 0 then "zero" elif \. == 1 then "one" else "many" end\'2305 22306=> "many"2307.2308.fi2309.2310.IP "" 02311.2209.P2210"zero" elif \. == 1 then "one" else "many" end\' 2 => "many"2211.2312.SS ">, >=, <=, <"2313The comparison operators \fB>\fR, \fB>=\fR, \fB<=\fR, \fB<\fR return whether their left argument is greater than, greater than or equal to, less than or equal to or less than their right argument (respectively)\.2314.2315.P
196 unmodified lines
2512.2513.IP "" 02514.2515.P2416where: * STRING, REGEX and FLAGS are jq strings and subject to jq string interpolation; * REGEX, after string interpolation, should be a valid PCRE regex; * FILTER is one of \fBtest\fR, \fBmatch\fR, or \fBcapture\fR, as described below\.2516where:2517.2518.IP "\(bu" 42519STRING, REGEX and FLAGS are jq strings and subject to jq string interpolation;2520.2521.IP "\(bu" 42522REGEX, after string interpolation, should be a valid PCRE regex;2523.2524.IP "\(bu" 42525FILTER is one of \fBtest\fR, \fBmatch\fR, or \fBcapture\fR, as described below\.2526.2527.IP "" 02528.2529.P2530FLAGS is a string consisting of one of more of the supported flags:2531.2532.IP "\(bu" 4
25 unmodified lines
2558.P2559To match whitespace in an x pattern use an escape such as \es, e\.g\.2560.2561.IP "\(bu" 42451test( "a\esb", "x" )\.2562test( "a\e\esb"; "x" )2563.2564.IP "" 02565.2566.P
114 unmodified lines
2681.2682.SS "splits(regex), splits(regex; flags)"2683These provide the same results as their \fBsplit\fR counterparts, but as a stream instead of an array\.2684.2574.SS "sub(regex; tostring) sub(regex; string; flags)"2685.SS "sub(regex; tostring), sub(regex; string; flags)"2686Emit the string obtained by replacing the first match of regex in the input string with \fBtostring\fR, after interpolation\. \fBtostring\fR should be a jq string, and may contain references to named captures\. The named captures are, in effect, presented as a JSON object (as constructed by \fBcapture\fR) to \fBtostring\fR, so a reference to a captured variable named "x" would take the form: "(\.x)"\.2687.2688.SS "gsub(regex; string), gsub(regex; string; flags)"2689\fBgsub\fR is like \fBsub\fR but all the non\-overlapping occurrences of the regex are replaced by the string, after interpolation\.
77 unmodified lines
2767.IP "" 42768.2769.nf27702660\&\.realnames as $names | \.posts[] | {title, author: $names[\.author]}2771\&.realnames as $names | \.posts[] | {title, author: $names[\.author]}2772.2773.fi2774.2775.IP "" 0
10 unmodified lines
2786.IP "" 42787.2788.nf27892679\&\. as {realnames: $names, posts: [$first, $second]} | \.\.\.2790\&. as {realnames: $names, posts: [$first, $second]} | \.\.\.2791.2792.fi2793.2794.IP "" 0
7 unmodified lines
2802.IP "" 42803.2804.nf28052695\&\.realnames as $names | (\.posts[] | {title, author: $names[\.author]})2806\&.realnames as $names | (\.posts[] | {title, author: $names[\.author]})2807.2808.fi2809.2810.IP "" 0
40 unmodified lines
2851.fi2852.2853.IP "" 02854.2855.SS "Destructuring Alternative Operator: ?//"2856The destructuring alternative operator provides a concise mechanism for destructuring an input that can take one of several forms\.2857.2858.P2859Suppose we have an API that returns a list of resources and events associated with them, and we want to get the user_id and timestamp of the first event for each resource\. The API (having been clumsily converted from XML) will only wrap the events in an array if the resource has multiple events:2860.2861.IP "" 42862.2863.nf28642865{"resources": [{"id": 1, "kind": "widget", "events": {"action": "create", "user_id": 1, "ts": 13}},2866 {"id": 2, "kind": "widget", "events": [{"action": "create", "user_id": 1, "ts": 14}, {"action": "destroy", "user_id": 1, "ts": 15}]}]}2867.2868.fi2869.2870.IP "" 02871.2872.P2873We can use the destructuring alternative operator to handle this structural change simply:2874.2875.IP "" 42876.2877.nf28782879\&.resources[] as {$id, $kind, events: {$user_id, $ts}} ?// {$id, $kind, events: [{$user_id, $ts}]} | {$user_id, $kind, $id, $ts}2880.2881.fi2882.2883.IP "" 02884.2885.P2886Or, if we aren\'t sure if the input is an array of values or an object:2887.2888.IP "" 42889.2890.nf28912892\&.[] as [$id, $kind, $user_id, $ts] ?// {$id, $kind, $user_id, $ts} | \.\.\.2893.2894.fi2895.2896.IP "" 02897.2898.P2899Each alternative need not define all of the same variables, but all named variables will be available to the subsequent expression\. Variables not matched in the alternative that succeeded will be \fBnull\fR:2900.2901.IP "" 42902.2903.nf29042905\&.resources[] as {$id, $kind, events: {$user_id, $ts}} ?// {$id, $kind, events: [{$first_user_id, $first_ts}]} | {$user_id, $first_user_id, $kind, $id, $ts, $first_ts}2906.2907.fi2908.2909.IP "" 02910.2911.P2912Additionally, if the subsequent expression returns an error, the alternative operator will attempt to try the next binding\. Errors that occur during the final alternative are passed through\.2913.2914.IP "" 42915.2916.nf29172918[[3]] | \.[] as [$a] ?// [$b] | if $a != null then error("err: \e($a)") else {$a,$b} end29192920jq \'\.[] as {$a, $b, c: {$d, $e}} ?// {$a, $b, c: [{$d, $e}]} | {$a, $b, $d, $e}\'2921 [{"a": 1, "b": 2, "c": {"d": 3, "e": 4}}, {"a": 1, "b": 2, "c": [{"d": 3, "e": 4}]}]2922=> {"a":1,"b":2,"d":3,"e":4}, {"a":1,"b":2,"d":3,"e":4}29232924jq \'\.[] as {$a, $b, c: {$d}} ?// {$a, $b, c: [{$e}]} | {$a, $b, $d, $e}\'2925 [{"a": 1, "b": 2, "c": {"d": 3, "e": 4}}, {"a": 1, "b": 2, "c": [{"d": 3, "e": 4}]}]2926=> {"a":1,"b":2,"d":3,"e":null}, {"a":1,"b":2,"d":null,"e":4}29272928jq \'\.[] as [$a] ?// [$b] | if $a != null then error("err: \e($a)") else {$a,$b} end\'2929 [[3]]2930=> {"a":null,"b":3}2931.2932.fi2933.2934.IP "" 02935.2936.SS "Defining Functions"2937You can give a filter a name using "def" syntax:2938.2939.IP "" 4
87 unmodified lines
3027.SS "Scoping"3028There are two types of symbols in jq: value bindings (a\.k\.a\., "variables"), and functions\. Both are scoped lexically, with expressions being able to refer only to symbols that have been defined "to the left" of them\. The only exception to this rule is that functions can refer to themselves so as to be able to create recursive functions\.3029.3030.P2839For example, in the following expression there is a binding which is visible "to the right" of it, \fB\.\.\. | \.*3 as $times_three | [\. + $times_three] | \.\.\.\fR, but not "to the left"\. Consider this expression now, \fB\.\.\. | (\.*3 as $times_three | [\.+ $times_three]) | \.\.\.\fR: here the binding \fB$times_three\fR is \fInot\fR visible past the closing parenthesis\.3031For example, in the following expression there is a binding which is visible "to the right" of it, \fB\.\.\. | \.*3 as $times_three | [\. + $times_three] | \.\.\.\fR, but not "to the left"\. Consider this expression now, \fB\.\.\. | (\.*3 as $times_three | [\. + $times_three]) | \.\.\.\fR: here the binding \fB$times_three\fR is \fInot\fR visible past the closing parenthesis\.3032.3033.SS "Reduce"3034The \fBreduce\fR syntax in jq allows you to combine all of the results of an expression by accumulating them into a single answer\. As an example, we\'ll pass \fB[3,2,1]\fR to this expression:3035.
191 unmodified lines
3227.P3228See your system\'s manual for more information on each of these\.3229.3230.SH "I/O"3039At this time jq has minimal support for I/O, mostly in the form of control over when inputs are read\. Two builtins functions are provided for this, \fBinput\fR and \fBinputs\fR, that read from the same sources (e\.g\., \fBstdin\fR, files named on the command\-line) as jq itself\. These two builtins, and jq\'s own reading actions, can be interleaved with each other\.3231At this time jq has minimal support for I/O, mostly in the form of control over when inputs are read\. Two builtins functions are provided for this, \fBinput\fR and \fBinputs\fR, that read from the same sources (e\.g\., \fBstdin\fR, files named on the command\-line) as jq itself\. These two builtins, and jq\'s own reading actions, can be interleaved with each other\. They are commonly used in combination with the null input option \fB\-n\fR to prevent one input from being read implicitly\.3232.3233.P3234Two builtins provide minimal output capabilities, \fBdebug\fR, and \fBstderr\fR\. (Recall that a jq program\'s output values are always output as JSON texts on \fBstdout\fR\.) The \fBdebug\fR builtin can have application\-specific behavior, such as for executables that use the libjq C API but aren\'t the jq executable itself\. The \fBstderr\fR builtin outputs its input in raw mode to stder with no additional decoration, not even a newline\.3235.
2 unmodified lines
3238.3239.SS "input"3240Outputs one new input\.3241.3242.P3243Note that when using \fBinput\fR it is generally be necessary to invoke jq with the \-n command\-line option, otherwise the first entity will be lost\.3244.3245.SS "inputs"3246Outputs all remaining inputs, one by one\.3247.3248.P3054This is primarily useful for reductions over a program\'s inputs\.3249This is primarily useful for reductions over a program\'s inputs\. Note that when using \fBinputs\fR it is generally necessary to invoke jq with the \-n command\-line option, otherwise the first entity will be lost\.3250.3251.SS "debug"3252Causes a debug message based on the input value to be produced\. The jq executable wraps the input value with \fB["DEBUG:", <input\-value>]\fR and prints that and a newline on stderr, compactly\. This may change in the future\.3253.
143 unmodified lines
3397.3398.P3399Provide input \'{"a": {"b": 10}, "b": 20}\' to the programs:3400.3206.P3207\&\.a = \.b3401.IP "" 43402.3209.P3210\&\.a |= \.b3403.nf34043405\&.a = \.b34063407\&.a |= \.b3408.3409.fi3410.3411.IP "" 03412.3413.P3414The former will set the "a" field of the input to the "b" field of the input, and produce the output {"a": 20, "b": 20}\. The latter will set the "a" field of the input to the "a" field\'s "b" field, producing {"a": 10, "b": 20}\.3415.3416.P3417Another example of the difference between \'=\' and \'|=\':3418.3218.P3419.IP "" 43420.3421.nf34223423null|(\.a,\.b)=range(3)3424.3425.fi3426.3427.IP "" 03428.3429.P3430outputs \'{"a":0,"b":0}\', \'{"a":1,"b":1}\', and \'{"a":2,"b":2}\', while3431.3224.P3432.IP "" 43433.3434.nf34353436null|(\.a,\.b)|=range(3)3437.3438.fi3439.3440.IP "" 03441.3442.P3443outputs just \'{"a":0,"b":0}\'\.3444.3445.SS "Complex assignments"
2 unmodified lines
3448.IP "" 43449.3450.nf34513237\&\.posts[0]\.title = "JQ Manual"3452\&.posts[0]\.title = "JQ Manual"3453.3454.fi3455.3456.IP "" 0
4 unmodified lines
3461.IP "" 43462.3463.nf34643250\&\.posts[]\.comments |= \. + ["this is great"]3465\&.posts[]\.comments |= \. + ["this is great"]3466.3467.fi3468.3469.IP "" 0
10 unmodified lines
3480.IP "" 43481.3482.nf34833269\&\.posts[] | select(\.author == "stedolan")3484\&.posts[] | select(\.author == "stedolan")3485.3486.fi3487.3488.IP "" 0
113 unmodified lines
3602.3603.IP "" 03604.3605.P3391The default color scheme is the same as setting \fB"JQ_COLORS=1;30:0;39:0;39:0;39:0;32:1;39:1;39"\fR\.3606The default color scheme is the same as setting \fB"JQ_COLORS=1;30:0;37:0;37:0;37:0;32:1;37:1;37"\fR\.3607.3608.P3609This is not a manual for VT100/ANSI escapes\. However, each of these color specifications should consist of two numbers separated by a semi\-colon, where the first number is one of these:3610.
52 unmodified lines
3663.IP "" 43664.3665.nf36663452https://github\.com/stedolan/jq/issues3667https://github\.com/jqlang/jq/issues3668.3669.fi3670.3671.IP "" 0
3 unmodified lines
modified:jq.spec+1 added-1 removed
3 unmodified lines
4Name: jq5Version: %{myver}6Release: %{myrel}%{?dist}7Source0: jq-%{myver}.tar.gz8URL: https://stedolan.github.io/jq8URL: https://jqlang.github.io/jq9License: BSD10AutoReqProv: no11#BuildPrereq: autoconf, libtool, automake, flex, bison, python12
58 unmodified lines
modified:libjq.pc.in+1 added-1 removed
2 unmodified lines
3libdir=@libdir@4includedir=@includedir@56Name: libjq7URL: https://stedolan.github.io/jq/7URL: https://jqlang.github.io/jq/8Description: Library to process JSON using a query language9Version: @VERSION@10Libs: -L${libdir} -ljq11Cflags: -I${includedir}
modified:README.md+4 added-4 removed
7 unmodified lines
8Windows: [![Windows build status](https://ci.appveyor.com/api/projects/status/mi816811c9e9mx29?svg=true)](https://ci.appveyor.com/project/stedolan/jq)91011If you want to learn to use jq, read the documentation at12[https://stedolan.github.io/jq](https://stedolan.github.io/jq). This12[https://jqlang.github.io/jq](https://jqlang.github.io/jq). This13documentation is generated from the docs/ folder of this repository.14You can also try it online at [jqplay.org](https://jqplay.org).1516If you want to hack on jq, feel free, but be warned that its internals17are not well-documented at the moment. Bring a hard hat and a18shovel. Also, read the wiki: https://github.com/stedolan/jq/wiki, where18shovel. Also, read the wiki: https://github.com/jqlang/jq/wiki, where19you will find cookbooks, discussion of advanced topics, internals,20release engineering, and more.2122Source tarball and built executable releases can be found on the23homepage and on the github release page, https://github.com/stedolan/jq/releases23homepage and on the github release page, https://github.com/jqlang/jq/releases2425If you're building directly from the latest git, you'll need flex,26bison (3.0 or newer), libtool, make, automake, and autoconf installed.27To get regexp support you'll also need to install Oniguruma or clone it as a
40 unmodified lines
68 scripts/crosscompile <name-of-build> <configure-options>6970Use the `--host=` and `--target=` ./configure options to select a71cross-compilation environment. See also72["Cross compilation"](https://github.com/stedolan/jq/wiki/Cross-compilation) on72["Cross compilation"](https://github.com/jqlang/jq/wiki/Cross-compilation) on73the wiki.7475Send questions to https://stackoverflow.com/questions/tagged/jq or to the #jq channel (https://web.libera.chat/#jq) on Libera.Chat (https://libera.chat/).