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.
int
@throws UnsupportedOperationException if this value is not a JSON number
@throws NumberFormatException if this JSON number can not be interpreted as int
value
If representation can not be converted to an int (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
If representation can not be converted to an int (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
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.
int
@throws UnsupportedOperationException if this value is not a JSON number
@throws NumberFormatException if this JSON number can not be interpreted as int
value
If the key does not exist or its value is not a number, then {@code 0} will be returned.
@param key the key @return an int If representation can not be converted to an int (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
@since 1.9 (replaces getValueAsInt
)
Returns the member's value as an int. If the value is not known to be an int, (because it's a javadoc tag or because it's a 175 annotation member of a type other than int) asString() is called. If the result is null, NumberFormatException is thrown. Otherwise, the String is converted to an int with Integer.valueOf(), which again may throw NumberFormatException.
defaultValue
if it does not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|