Rate This Document
Findability
Accuracy
Completeness
Readability

JsonElement::getAsInt() const

Function Usage

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

Function Syntax

int JsonElement::getAsInt() const;

Return Value

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

If the data type of the node is not int, an uninitialized int value is returned.