-
Notifications
You must be signed in to change notification settings - Fork 1.6k
C: `jv` API patterns resembling `jq` patterns
Nico Williams edited this page Aug 30, 2023
·
2 revisions
C is not jq. A lot of jq patterns can't be replicated in C with the jv
API, but some resemblance for some patterns can be had.
jv a = jv_array();
jv a = JV_ARRAY(jv_string("this"),jv_number(3) /*, etc., up to 9 */);
jv a = ...; // some array
jv b = ...; // stuff
a = jv_array_concat(a, b); // note: frees `b`
There's no nice jq equivalent of this, oddly:
a = jv_array_append(a, v);
- Home
- FAQ
- jq Language Description
- Cookbook
- Modules
- Parsing Expression Grammars
- Docs for Oniguruma Regular Expressions (RE.txt)
- Advanced Topics
- Guide for Contributors
- How To
- C API
- jq Internals
- Tips
- Development