Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-12-31 | Further module system revamp (fix #659) | Nicolas Williams | |
To import a module now use: # Import module.jq file: import "relative/path/to/module" as foo; # Use the module's defs as foo::<def-name> To import a JSON file: # Read file.json: import "relative/path/to/file" as $foo; # # Use as $foo::foo Using `-L` now drops the builtin library path and appends the requested path to the empty array (or the result of an earlier `-L`). Support for the `$JQ_LIBRARY_PATH` environment variable has been removed. | |||
2014-12-30 | Add `label $name | EXP`; fix `break` | Nicolas Williams | |
This is to fix the problem where `break` is dynamic, not lexical. With this it should be possible to do this sort of thing: label $break | inputs | if ... then $break|error else . end This is a backwards-incompatible change for master, but the previous `break` hadn't shipped yet. Still needed: - testing | |||
2014-12-30 | Remove string indexing by string (fix #454) | Nicolas Williams | |
This turns out to have been a bad idea: "foo"|.["o"] it interacts badly with `path()`. See #454 for the gory details. | |||
2014-12-27 | bsearch(x) (binary search): builtin.c (tested), with documentation and test ↵ | pkoppstein | |
case. Always yields an integer (even if input is unsorted); returns (-1 - ix) if x is not in input array. | |||
2014-12-27 | ascii_upcase/0 and ascii_downcase/0 | pkoppstein | |
2014-12-27 | Add `debug` builtin | Nicolas Williams | |
And refactor setup of jv dump flags. | |||
2014-12-27 | Don't force C API users to set input cb | Nicolas Williams | |
2014-12-26 | Add Streaming parser (--stream) | Nicolas Williams | |
Streaming means that outputs are produced as soon as possible. With the `foreach` syntax one can write programs which reduce portions of the streaming parse of a large input (reduce into proper JSON values, for example), and discard the rest, processing incrementally. This: $ jq -c --stream . should produce the same output as this: $ jq -c '. as $dot | path(..) as $p | $dot | getpath($p) | [$p,.]' The output of `jq --stream .` should be a sequence of`[[<path>],<leaf>]` and `[[<path>]]` values. The latter indicate that the array/object at that path ended. Scalars and empty arrays and objects are leaf values for this purpose. For example, a truncated input produces a path as soon as possible, then later the error: $ printf '[0,\n'|./jq -c --stream . [[0],0] parse error: Unfinished JSON term at EOF at line 3, column 0 $ | |||
2014-12-26 | Fix `foreach` non-progation of errors | Nicolas Williams | |
Errors were being re-propagated as "break". Also add `error/0` builtin, which made this fix easier. | |||
2014-12-26 | Fix in and inside | Nicolas Williams | |
2014-12-26 | Merge pull request #366 from slapresta/inversed-contains | Nico Williams | |
Added `in` command | |||
2014-12-26 | Merge pull request #628 from slapresta/map-on-objects | Nico Williams | |
Modify map\1 so that it works on objects | |||
2014-12-24 | Add @tsv; fix #645 | Nicolas Williams | |
2014-12-23 | Merge pull request #601 from slapresta/redefine-any-all | Nico Williams | |
Define {any,all}/0,1 in terms of {any,all}/2 | |||
2014-12-23 | Make `values` faster (fix #652) | Nicolas Williams | |
2014-12-22 | Define `map_values` | Santiago Lapresta | |
2014-12-22 | `in` is now `inside`, added `in` as inverse of `has` | Santiago Lapresta | |
2014-12-22 | Added `in` command | Santiago Lapresta | |
2014-12-12 | Add until(cond; next); fix #639 | Nicolas Williams | |
2014-11-12 | Fix #600. Add regression test | William Langford | |
2014-10-21 | Define {any,all}/2 independently from {any,all}/0 | Santiago Lapresta | |
2014-10-20 | Define {any,all}/{0,1} in terms of {any,all}/2 | Santiago Lapresta | |
2014-10-06 | Properly call onig_error_code_to_str | William Langford | |
Fix #585 | |||
2014-10-06 | fix sub (#586); add gsub/3; add transpose/0. | pkoppstein | |
Signed-off-by: William Langford <wlangfor@gmail.com> | |||
2014-10-03 | Restore `split/1`; don't use regexp (fix #576) | Nicolas Williams | |
2014-10-03 | from-entries should work with EC2 (fix #592) | Nicolas Williams | |
2014-10-03 | Remove sort/1 and group/1 | Nicolas Williams | |
Reserve these for sorting with jq-coded comparators. | |||
2014-09-30 | to_entries should not sort keys (fix #561) | Nicolas Williams | |
2014-08-21 | C-coded builtins should not assert (fix #553) | Nicolas Williams | |
2014-08-14 | Add `module` directive, `modulemeta` builtin | Nicolas Williams | |
Fix #425. | |||
2014-08-11 | Fix #549 | Nicolas Williams | |
2014-08-09 | More constant folding: null, true, and false | Nicolas Williams | |
A step towards doing constant folding for arrays and objects. | |||
2014-08-08 | Make `nwise` private | Nicolas Williams | |
2014-08-08 | Make regexp builtins and range/3 use #524 too | Nicolas Williams | |
2014-08-08 | Use `def f($a): ...;` syntax for builtins | Nicolas Williams | |
2014-08-08 | regex filters (#432): scan, splits, split, sub, gsub | pkoppstein | |
2014-08-04 | Apply TCO to recurse/1, add recurse/2; tweak docs | pkoppstein | |
Signed-off-by: Nicolas Williams <nico@cryptonector.com> | |||
2014-08-01 | Some builtins are unnecessarily special (fix #521) | Nicolas Williams | |
2014-07-28 | Add capture; document regular expression filters | pkoppstein | |
Fix #493. | |||
2014-07-28 | Add `first`, `nth`, `last` (fix #510) | Nicolas Williams | |
2014-07-22 | Added library system with -l, -L, and JQ_LIBRARY_PATH | William Langford | |
Created util.[ch] to hold common utilities. | |||
2014-07-09 | Make `while()` handle `break` | Nicolas Williams | |
2014-07-07 | Make C-coded built-ins take `jq_state *` argument | Nicolas Williams | |
2014-07-07 | `error(x)` should not `tostring` its arg; fix #466 | Nicolas Williams | |
2014-07-07 | `limit` should use `break` | Nicolas Williams | |
2014-07-07 | Make `any/2` and `all/2` efficient using `foreach` | Nicolas Williams | |
2014-07-07 | Add `break` builtin for `foreach` | Nicolas Williams | |
2014-07-06 | Add `any/N` and `all/N` x N in (1, 2) (fix #455) | Nicolas Williams | |
Contributed by @pkoppstein. | |||
2014-07-06 | Add `foreach` and `limit` | Nicolas Williams | |
2014-07-02 | Add `while(cond; update)` (fix #314) | Nicolas Williams | |