jn2bool()#
Convert a JSON value to a boolean. Works with json_t *.
Prototype
PUBLIC BOOL jn2bool(
json_t *jn,
BOOL default_value
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
The JSON value to convert. |
|
|
|
The default value to return if the JSON value cannot be converted to a boolean. |
Return Value
Returns the boolean value, or default_value if the conversion fails.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples