-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C API: jq program invocation
TBD
-
The libjq public API is declared in
jq.handjv.h. There is no documentation at this time. Use the source code, and in particular seemain.c:main(). -
Hint: the API in
jv.his for dealing with parsed JSON values, while the API injq.his for evaluating jq programs. Usejq_init()to allocate ajq_state *value, then usejq_compile_args()to compile a jq program, then usejq_start()to get ready to evaluate it on one input value, and then repeatedly calljq_next()to extract all the output values that the program produces. Termination is indicated byjq_next()outputting an invalid value (without a message), while errors are indicated byjq_next()outputting an invalid value with a message. When done, usejq_teardown()to release thejq_state *value.
- 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