long value, assuming that this value represents a JSON number that can be interpreted as Java long. If this is not the case, an exception is thrown. To be interpreted as Java long, the JSON number must neither contain an exponent nor a fraction part. Moreover, the number must be in the Long range.
long
@throws UnsupportedOperationException if this value is not a JSON number
@throws NumberFormatException if this JSON number can not be interpreted as long value
If representation can not be converted to an long (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
long value, assuming that this value represents a JSON number that can be interpreted as Java long. If this is not the case, an exception is thrown. To be interpreted as Java long, the JSON number must neither contain an exponent nor a fraction part. Moreover, the number must be in the Long range.
long
@throws UnsupportedOperationException if this value is not a JSON number
@throws NumberFormatException if this JSON number can not be interpreted as long value
If representation can not be converted to an long (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
@since 1.9 (replaces getValueAsLong)
defaultValue if it does not exist.
| |
| |