Returns this JSON value as an
int
value, assuming that this value represents a JSON number that can be interpreted as Java
int
. If this is not the case, an exception is thrown.
To be interpreted as Java int
, the JSON number must neither contain an exponent nor a fraction part. Moreover, the number must be in the Integer
range.
@return this value as
int
@throws UnsupportedOperationException if this value is not a JSON number
@throws NumberFormatException if this JSON number can not be interpreted as
int
value