jn2real()
#
Convert a JSON value to a real (floating-point) number. Works with json_t *
.
Prototype
PUBLIC double jn2real(
json_t *jn,
double 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 real. |
Return Value
Returns the real 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