kw_has_key()

kw_has_key()#

Check if a JSON object contains a specific key with json_t *.

Prototype

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

Parameters

Key

Type

Description

kw

json_t *

The JSON object to query.

key

const char *

The key to check for in the JSON object.


Return Value

Returns TRUE if the key exists in the JSON object, otherwise returns FALSE.

Prototype

// Not applicable in JS

Prototype

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