kw_get_list()

kw_get_list()#

Get the value of a key from a JSON object as a list. Works with json_t *.

Prototype

PUBLIC json_t *kw_get_list(
    json_t      *kw,
    const char  *key,
    BOOL        create
);
        

Parameters

Key

Type

Description

kw

json_t *

The JSON object to query.

key

const char *

The key whose value will be retrieved as a list.

create

BOOL

If TRUE, creates an empty list for the key if it does not exist.


Return Value

Returns a pointer to the list, or NULL if the key does not exist and create is FALSE.

Prototype

// Not applicable in JS

Prototype

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