public static enum JsonPathConfig.NumberReturnType extends Enum<JsonPathConfig.NumberReturnType>
To specify the return type of decimal numbers parsed from the json, use the following:
Enum Constant and Description |
---|
BIG_DECIMAL
Convert all non-integer numbers to BigDecimal
|
BIG_INTEGER
Converts all non-decimal numbers to BigInteger
|
DOUBLE
Convert all non-integer numbers to doubles
|
FLOAT_AND_DOUBLE
Convert all non-integer numbers to floats and doubles (depending on the size of the number)
|
Modifier and Type | Method and Description |
---|---|
boolean |
isFloatOrDouble()
Returns a boolean indicating whether this type is included in those that deal with floats
or doubles exclusive of BigDecimal.
|
static JsonPathConfig.NumberReturnType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonPathConfig.NumberReturnType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonPathConfig.NumberReturnType FLOAT_AND_DOUBLE
public static final JsonPathConfig.NumberReturnType BIG_DECIMAL
public static final JsonPathConfig.NumberReturnType DOUBLE
public static final JsonPathConfig.NumberReturnType BIG_INTEGER
public static JsonPathConfig.NumberReturnType[] values()
for (JsonPathConfig.NumberReturnType c : JsonPathConfig.NumberReturnType.values()) System.out.println(c);
public static JsonPathConfig.NumberReturnType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final boolean isFloatOrDouble()
true
if value is FLOAT_AND_DOUBLE
or DOUBLE
, false
otherwise.Copyright © 2010–2020. All rights reserved.