kw_match_simple()
#
The function kw_match_simple()
compares a JSON dictionary against a JSON filter, matching only string, integer, real, and boolean values.
Prototype
BOOL kw_match_simple(
json_t *kw, // NOT owned
json_t *jn_filter // owned
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The JSON dictionary to be matched against the filter. This parameter is not owned by the function. |
|
|
The JSON filter used for comparison. This parameter is owned by the function and will be decremented. |
Return Value
Returns TRUE
if kw
matches jn_filter
, otherwise returns FALSE
.
Notes
This function only compares simple JSON elements such as strings, integers, reals, and booleans. If jn_filter
is NULL
, the function returns TRUE
by default. If jn_filter
is an empty object, it also evaluates as TRUE
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples