kw_filter_private()

kw_filter_private()#

The function kw_filter_private() returns a duplicate of the given JSON object or array, removing all private keys that begin with a single underscore (_).

Prototype

json_t *kw_filter_private(
    hgobj gobj,
    json_t *kw  // owned
);

Parameters

Key

Type

Description

gobj

hgobj

A handle to the GObj instance, used for logging errors.

kw

json_t *

The JSON object or array to be filtered. This parameter is owned and will be decremented.


Return Value

A new JSON object or array with private keys removed. The caller owns the returned JSON object.

Notes

Private keys are identified as those that begin with a single underscore (_). The function uses _duplicate_object() and _duplicate_array() to create a filtered copy of the input JSON.

Prototype

// Not applicable in JS

Prototype

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