print_json2()
#
Prints a JSON object to stdout with indentation and a label.
Prototype
int print_json2(
const char *label,
json_t *jn
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A label to print before the JSON output. |
|
|
The JSON object to print. |
Return Value
Returns 0 on success, or -1 if the JSON object is NULL or has an invalid reference count.
Notes
Uses json_dumpf()
to print the JSON object with indentation.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples