json_print_refcounts()

json_print_refcounts()#

Prints the reference counts of a JSON object and its nested elements recursively.

Prototype

PUBLIC int json_print_refcounts(
    json_t *jn,  // not owned
    int level
);

Parameters

Key

Type

Description

jn

json_t *

The JSON object whose reference counts will be printed. It is not owned by the function.

level

int

The indentation level for formatting the output.


Return Value

Returns 0 on success.

Notes

This function is useful for debugging memory management issues related to JSON reference counts.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples