Enum Class TemporalFormat

java.lang.Object
java.lang.Enum<TemporalFormat>
org.apache.juneau.marshall.TemporalFormat
All Implemented Interfaces:
Serializable, Comparable<TemporalFormat>, Constable

public enum TemporalFormat extends Enum<TemporalFormat>
Supported wire formats for TemporalAccessor values.

Used by MarshallingContext.Builder.temporalFormat(TemporalFormat), Marshalled.temporalFormat(), MarshalledProp.temporalFormat(), and MarshalledConfig.temporalFormat() to control how TemporalAccessor values (Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, ZonedDateTime, Year, YearMonth, MonthDay, …) are written to and read from the wire.

The default is DEFAULT which uses the per-subtype default formatter (e.g. DateTimeFormatter.ISO_INSTANT for Instant, DateTimeFormatter.ISO_LOCAL_DATE for LocalDate, etc.) — preserving the historical wire output produced before this enum existed.

Numeric formats (MILLIS) emit native numeric wire types on binary serializers (BSON / CBOR / MsgPack) and bare numbers on text formats. Text formats emit a quoted ISO 8601 string for every other constant.

Most subtypes implement Temporal, but MonthDay only implements TemporalAccessor. Format/parse methods accept any TemporalAccessor so that MonthDay round-trips through the same dispatch path as the Temporal subtypes.