kw_get_real()
#
Get the value of a key as a real (floating-point) number from a JSON object. Works with json_t *
.
Prototype
PUBLIC double kw_get_real(
json_t *kw,
const char *key,
double default_value
);
Parameters
Key |
Type |
Description |
---|---|---|
|
The JSON object to query. |
|
|
|
The key whose value will be retrieved as a real number. |
|
|
The default value to return if the key does not exist or is not a real number. |
Return Value
Returns the real value of the key, or default_value
if the key does not exist or is not a real number.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples