public static enum JsonFormat.Feature extends Enum<JsonFormat.Feature>
SerializationFeature
or DeserializationFeature
, as noted by entries.
Note that whether specific setting has an effect depends on whether
JsonSerializer
/ JsonDeserializer
being used
takes the format setting into account. If not, please file an issue
for adding support via issue tracker for package that has handlers
(if you know which one; if not, just use `jackson-databind`).
Enum Constant and Description |
---|
ACCEPT_CASE_INSENSITIVE_PROPERTIES
Override for
MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES . |
ACCEPT_SINGLE_VALUE_AS_ARRAY
Override for
DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY
which will allow deserialization of JSON non-array values into single-element
Java arrays and Collection s. |
ADJUST_DATES_TO_CONTEXT_TIME_ZONE
Override for
DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIMEZONE
that specifies whether context provided timezone
DeserializationContext.getTimeZone() should be used to adjust Date/Time
values on deserialization, even if value itself contains timezone information |
WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
Override for
SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS ,
similar constraints apply. |
WRITE_DATES_WITH_ZONE_ID
Override for
SerializationFeature.WRITE_DATES_WITH_ZONE_ID ,
similar constraints apply. |
WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED
Override for
SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED
which will force serialization of single-element arrays and Collection s
as that single element and excluding array wrapper. |
WRITE_SORTED_MAP_ENTRIES
Override for
SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS ,
enabling of which will force sorting of Map keys before
serialization. |
Modifier and Type | Method and Description |
---|---|
static JsonFormat.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonFormat.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonFormat.Feature ACCEPT_SINGLE_VALUE_AS_ARRAY
DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY
which will allow deserialization of JSON non-array values into single-element
Java arrays and Collection
s.public static final JsonFormat.Feature ACCEPT_CASE_INSENSITIVE_PROPERTIES
MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES
.
Only affects deserialization, has no effect on serialization.public static final JsonFormat.Feature WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
,
similar constraints apply.public static final JsonFormat.Feature WRITE_DATES_WITH_ZONE_ID
SerializationFeature.WRITE_DATES_WITH_ZONE_ID
,
similar constraints apply.public static final JsonFormat.Feature WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED
SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED
which will force serialization of single-element arrays and Collection
s
as that single element and excluding array wrapper.public static final JsonFormat.Feature WRITE_SORTED_MAP_ENTRIES
SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS
,
enabling of which will force sorting of Map
keys before
serialization.public static final JsonFormat.Feature ADJUST_DATES_TO_CONTEXT_TIME_ZONE
DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIMEZONE
that specifies whether context provided timezone
DeserializationContext.getTimeZone()
should be used to adjust Date/Time
values on deserialization, even if value itself contains timezone informationpublic static JsonFormat.Feature[] values()
for (JsonFormat.Feature c : JsonFormat.Feature.values()) System.out.println(c);
public static JsonFormat.Feature 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–2016 FasterXML. All rights reserved.