debug_json()
#
Prints a JSON object with its reference counts, providing a structured view of its contents.
Prototype
int debug_json(
const char *label,
json_t *jn,
BOOL verbose
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A label to prefix the output, used for identification. |
|
|
The JSON object to be printed, must not be NULL. |
|
|
If TRUE, prints detailed information including indentation. |
Return Value
Returns 0 on success, or -1 if the JSON object is NULL or has an invalid reference count.
Notes
This function is useful for debugging JSON structures by displaying their contents and reference counts.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples