public enum JavaTimeFeature extends Enum<JavaTimeFeature> implements com.fasterxml.jackson.core.util.JacksonFeature
JavaTimeModule).| Enum Constant and Description |
|---|
ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
Feature that controls whether stringified numbers (Strings that without
quotes would be legal JSON Numbers) may be interpreted as
timestamps (enabled) or not (disabled), in case where there is an
explicitly defined pattern (
DateTimeFormatter) for value. |
NORMALIZE_DESERIALIZED_ZONE_ID
Feature that determines whether
ZoneId is normalized
(via call to java.time.ZoneId#normalized()) when deserializing
types like ZonedDateTime. |
ONE_BASED_MONTHS
Feature that determines whether
Month is serialized
and deserialized as using a zero-based index (FALSE) or a one-based index (TRUE). |
USE_TIME_ZONE_FOR_LENIENT_DATE_PARSING
Feature that determines whether the
TimeZone of the
DeserializationContext is used
when leniently deserializing LocalDate or
LocalDateTime from the UTC/ISO instant format. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enabledByDefault() |
boolean |
enabledIn(int flags) |
int |
getMask() |
static JavaTimeFeature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JavaTimeFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaTimeFeature NORMALIZE_DESERIALIZED_ZONE_ID
ZoneId is normalized
(via call to java.time.ZoneId#normalized()) when deserializing
types like ZonedDateTime.
Default setting is enabled, for backwards-compatibility with Jackson 2.15.
public static final JavaTimeFeature USE_TIME_ZONE_FOR_LENIENT_DATE_PARSING
TimeZone of the
DeserializationContext is used
when leniently deserializing LocalDate or
LocalDateTime from the UTC/ISO instant format.
Default setting is disabled, for backwards-compatibility with Jackson 2.18.
public static final JavaTimeFeature ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
DateTimeFormatter) for value.
Note that when the default pattern is used (no custom pattern defined), stringified numbers are always accepted as timestamps regardless of this feature.
public static final JavaTimeFeature ONE_BASED_MONTHS
Month is serialized
and deserialized as using a zero-based index (FALSE) or a one-based index (TRUE).
For example, "1" would be serialized/deserialized as Month.JANUARY if TRUE and Month.FEBRUARY if FALSE.
Default setting is false, meaning that Month is serialized/deserialized as a zero-based index.
public static JavaTimeFeature[] values()
for (JavaTimeFeature c : JavaTimeFeature.values()) System.out.println(c);
public static JavaTimeFeature 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 boolean enabledByDefault()
enabledByDefault in interface com.fasterxml.jackson.core.util.JacksonFeaturepublic boolean enabledIn(int flags)
enabledIn in interface com.fasterxml.jackson.core.util.JacksonFeaturepublic int getMask()
getMask in interface com.fasterxml.jackson.core.util.JacksonFeatureCopyright © 2025 FasterXML. All rights reserved.