DateTimeFeature enum
On/off settings for writing and reading DateTime and Duration,
named after Jackson 3's DateTimeFeature (set by
spring.json.datatype.datetime.*; Spring Boot 4:
spring.jackson.datatype.datetime.*).
- Inheritance
- Implemented types
- Available extensions
Values
- writeDatesAsTimestamps → const DateTimeFeature
-
DateTimeis written as a number instead of ISO-8601 text (WRITE_DATES_AS_TIMESTAMPS). Off by default.const DateTimeFeature(false) - writeDurationsAsTimestamps → const DateTimeFeature
-
Durationis written as a number instead of ISO-8601 text such asPT1M30S(WRITE_DURATIONS_AS_TIMESTAMPS). Off by default.const DateTimeFeature(false) - writeDateTimestampsAsNanoseconds → const DateTimeFeature
-
Numbers written for dates and durations are seconds with the fraction, not milliseconds (
WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS). On by default, like Jackson 3.const DateTimeFeature(true) - readDateTimestampsAsNanoseconds → const DateTimeFeature
-
Integer timestamps are read as seconds, not milliseconds; a number with a fraction is seconds either way (
READ_DATE_TIMESTAMPS_AS_NANOSECONDS). On by default.const DateTimeFeature(true)
Properties
- enabledByDefault → bool
-
Whether the feature is on when nobody configured it.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
DateTimeFeature> - A constant List of the values in this enum, in order of their declaration.