summaryrefslogtreecommitdiffstats
path: root/jv.c
AgeCommit message (Collapse)Author
2014-07-22Rename jq_memmem() to _jq_memmem()Nicolas Williams
2014-07-22Added library system with -l, -L, and JQ_LIBRARY_PATHWilliam Langford
Created util.[ch] to hold common utilities.
2014-07-07jv_invalid() shouldn't allocateNicolas Williams
jv_invalid() should behave like jv_invalid_with_msg(jv_null()), and neither should allocate memory, because neither ought to need to.
2014-06-08Add `indices(s)`, improve `index(s)`, `rindex(s)`Nicolas Williams
Now these deal with arrays as input and `s` being an array or a scalar.
2014-06-02Fix tests failures on WindowsNicolas Williams
And Solaris 8 and 9 too, no doubt. The problem was that non-standard vsnprintf()s that return -1 when the buffer is too small were not properly supported.
2014-03-08Add a recursive object merge strategy and bind it to *Filippo Valsorda
This commit adds a jv_object_merge_recursive function, that performs recursive object merging, and binds it to multiply when applied to two objects. Added docs and tests. Closes #320
2013-12-17Fix memmem() errorNicolas Williams
2013-12-10add checking of numeric indices to an array to see if they can reasonably be ↵David R. MacIver
considered integers. Avoid undefined behaviour if out of bounds
2013-12-08Clean up string/object interactions in jv.Stephen Dolan
2013-12-08Refactor jv structure.Stephen Dolan
New structure layout is simpler and also faster. In particular, it's now small enough to be passed in registers on amd64.
2013-12-04Add index strings by string; return string indexesNicolas Williams
% jq '.[","]' "a,bc,def,ghij,klmno" [1,4,8,13] %
2013-12-04Add jv_string_vfmt()Nicolas Williams
2013-12-04Add string slicingNicolas Williams
2013-12-04Add string division by string (split on separator)Nicolas Williams
2013-12-04Add explode/implode jq functions to match jv APINicolas Williams
2013-12-04Use uint32_t for codepoint in jv_string_append_codepoint()Nicolas Williams
2013-12-04Add jv string utility functionsNicolas Williams
jv_string_empty() -> return an empty string with given allocated length (for fast appends) jv_string_append_codepoint -> append a single codepoint (int) to the given string jv_string_explode -> return an array of codepoints making up a string jv_string_implode -> return the UTF-8 encoding of an array of codepoint numbers
2013-12-04Preserve insertion order in objects. Closes #169.Stephen Dolan
2013-09-14Merge branch 'libjq'Stephen Dolan
Conflicts: Makefile.am configure.ac
2013-06-23Remove #includes from jv.hlibjqStephen Dolan
2013-06-22Fix various UTF8 parsing bugs.Stephen Dolan
In particular, parse bad UTF8 by replacing the broken bits with U+FFFD and resychronise correctly after broken sequences.
2013-05-15'length' function now measures string length in codepoints, not bytes.Stephen Dolan
2013-05-13Fix a bug triggered by jv_array_slice.Stephen Dolan
2013-05-07Rename complex to nontrivial for safety (#113)Nicolas Williams
2012-12-31Clean up jv_object_foreach and add jv_array_foreachStephen Dolan
2012-12-28Path manipulation (path/getpath/setpath/delpath) and docs.Stephen Dolan
del function should fix #37.
2012-12-18Add wrappers for malloc/realloc/free. See #43.Stephen Dolan
2012-10-25Remove redundant code from jv_object_containsStephen Roantree
2012-10-24Restructure contains methods to use public jv methodsStephen Roantree
2012-10-24Implemented contains operatorStephen Roantree
2012-09-18Move everything around - delete old Haskell code, clean up build.Stephen Dolan