Rate This Document
Findability
Accuracy
Completeness
Readability

JsonElement::getAsDouble() const

Function Usage

Uses errno to indicate an invalid call if the JsonElement node is not of a numeric type, or otherwise, returns the double value of the node.

Function Syntax

double JsonElement::getAsDouble() const;

Return Value

  • Success: the double value of the node.
  • Failure: an uninitialized double value.

If the data type of the node is not double, data type conversion occurs, which may cause precision loss.