kw_has_word()
#
Checks if a given word
exists within the JSON object kw
. The word can be found in a string, list, or dictionary. Supports recursive search and verbosity options.
Prototype
BOOL kw_has_word(
hgobj gobj,
json_t *kw, // NOT owned
const char *word,
kw_flag_t kw_flag
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Handle to the calling object, used for logging errors. |
|
|
JSON object to search within. Must be a dictionary, list, or string. |
|
|
The word to search for within |
|
|
Flags controlling search behavior, such as |
Return Value
Returns TRUE
if the word
is found in kw
, otherwise returns FALSE
.
Notes
The function supports searching within JSON strings, lists, and dictionaries. If kw_flag
includes KW_VERBOSE
, errors will be logged when kw
is not a valid type.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples