public enum CoercionInputShape extends Enum<CoercionInputShape>
JsonToken
types) used for
configuring CoercionAction
s to take when reading
input into target types (specific type or LogicalType
).
Contains both physical input shapes (which match one of
JsonToken
types) and a few
logical input shapes ("empty" variants).
Note that null
input shape is explicitly not included as
its configuration is distinct from other types.
Enum Constant and Description |
---|
Array
Shape of Array values from input (token sequence from
JsonToken.START_ARRAY to
JsonToken.END_ARRAY ) |
Binary
Shape of binary data values from input, if expressed natively
by underlying format (many
textual formats, including JSON, do not have such shape); if so
generally seen as
JsonToken.VALUE_EMBEDDED_OBJECT . |
Boolean
Shape of boolean values from input (tokens
JsonToken.VALUE_TRUE and
JsonToken.VALUE_FALSE ) |
EmptyArray
Special case of Array values with no actual content (sequence of 2 tokens:
JsonToken.START_ARRAY ,
JsonToken.END_ARRAY ):
usually used to allow special coercion into "empty" or null target type. |
EmptyObject
Special case of Object values with no actual content (sequence of 2 tokens:
JsonToken.START_OBJECT ,
JsonToken.END_OBJECT ):
usually used to allow special coercion into "empty" or null target type. |
EmptyString
Special case for String values with no content (or, if allowed by format or specific
configuration, also "blank" String, that is, all-whitespace content).
|
Float
Shape of floating point (non-integral) numeric values from input (token
JsonToken.VALUE_NUMBER_FLOAT ) |
Integer
Shape of integral (non-floating point) numeric values from input (token
JsonToken.VALUE_NUMBER_INT ) |
Object
Shape of Object values from input (token sequence from
JsonToken.START_OBJECT to
JsonToken.END_OBJECT ) |
String
Shape of string values from input (tokens
JsonToken.VALUE_STRING ) |
Modifier and Type | Method and Description |
---|---|
static CoercionInputShape |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CoercionInputShape[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CoercionInputShape Array
JsonToken.START_ARRAY
to
JsonToken.END_ARRAY
)public static final CoercionInputShape Object
JsonToken.START_OBJECT
to
JsonToken.END_OBJECT
)public static final CoercionInputShape Integer
JsonToken.VALUE_NUMBER_INT
)public static final CoercionInputShape Float
JsonToken.VALUE_NUMBER_FLOAT
)public static final CoercionInputShape Boolean
JsonToken.VALUE_TRUE
and
JsonToken.VALUE_FALSE
)public static final CoercionInputShape String
JsonToken.VALUE_STRING
)public static final CoercionInputShape Binary
JsonToken.VALUE_EMBEDDED_OBJECT
.public static final CoercionInputShape EmptyArray
JsonToken.START_ARRAY
,
JsonToken.END_ARRAY
):
usually used to allow special coercion into "empty" or null
target type.public static final CoercionInputShape EmptyObject
JsonToken.START_OBJECT
,
JsonToken.END_OBJECT
):
usually used to allow special coercion into "empty" or null
target type.public static final CoercionInputShape EmptyString
null
target type.public static CoercionInputShape[] values()
for (CoercionInputShape c : CoercionInputShape.values()) System.out.println(c);
public static CoercionInputShape 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 nullCopyright © 2008–2023 FasterXML. All rights reserved.