JsonElement::getAsFloat() const
Function Usage
Uses errno to indicate an invalid call if the JsonElement node is not of a numeric type, or otherwise, returns the float value of the node.
Function Syntax
floatJsonElement::getAsFloat()const;
Return Value
- Success: the float value of the node.
- Failure: an uninitialized float value.
If the data type of the node is not float, data type conversion occurs, which may cause precision loss.
Parent topic: Function Syntax