Interface SerdeConfiguration
- All Known Implementing Classes:
MicronautJsonbProvider.JsonbSerdeConfiguration
public interface SerdeConfiguration
- Author:
- gkrocher
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumTime unit to use when deserializing a numeric value, or when serializing to a numeric value as configured bygetTimeWriteShape().static enumShape to use for time serialization. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe date format to use when serializing and deserializing dates.The packages containing introspections that should be regarded as serializable by default without the need to add theSerdeableannotation.intThe maximum nesting depth for serialization and deserialization.The unit to use for serializing and deserializing dates to or from numbers.default @Nullable PropertyNamingStrategydefault @Nullable StringShape for serializing dates.default booleandefault booleanWhentrue, mappers should respect JsonView annotations on arguments passed to read/write methods.default booleanControl whether deprecated three-letter time zone IDs are rejected.booleanControl whether to use legacy behavior for writing byte arrays.default booleanControl whether date/time values are written in JSON-B strict I-JSON temporal form.default booleanControl whetherDurationvalues are written and read as ISO-8601 strings.default booleanControl whetherDatevalues are written with the configured time zone id.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_INET_ADDRESS_AS_NUMERIC
static final boolean DEFAULT_INET_ADDRESS_AS_NUMERIC- See Also:
-
-
Method Details
-
getDateFormat
-
isInetAddressAsNumeric
default boolean isInetAddressAsNumeric()- Returns:
- Whether to use
InetAddress.getHostAddress()when serializingInetAddress.
-
getTimeWriteShape
Shape for serializing dates.- Returns:
- The date serialization shape
-
getNumericTimeUnit
The unit to use for serializing and deserializing dates to or from numbers. Note thatLocalDatealways uses the epoch day, regardless of this setting.- Returns:
- The time unit
-
isWriteBinaryAsArray
@Bindable(defaultValue="true") boolean isWriteBinaryAsArray()Control whether to use legacy behavior for writing byte arrays. When set totrue(the default in serde 2.x), byte arrays will always be written as arrays of numbers. When set tofalse, the encoding may be format-specific instead, and will be a base64 string for JSON.- Returns:
- Whether to use legacy byte array writing behavior
-
isWriteDurationsAsStrings
@Bindable(defaultValue="false") default boolean isWriteDurationsAsStrings()Control whetherDurationvalues are written and read as ISO-8601 strings.- Returns:
- Whether durations are represented as strings
- Since:
- 3.1.0
-
isWriteJavaUtilDatesWithZoneId
@Bindable(defaultValue="false") default boolean isWriteJavaUtilDatesWithZoneId()Control whetherDatevalues are written with the configured time zone id.- Returns:
- Whether dates include a zone id
- Since:
- 3.1.0
-
isRejectDeprecatedThreeLetterTimeZoneIds
@Bindable(defaultValue="false") default boolean isRejectDeprecatedThreeLetterTimeZoneIds()Control whether deprecated three-letter time zone IDs are rejected.- Returns:
- Whether deprecated time zone IDs are rejected
- Since:
- 3.1.0
-
isWriteDateTimesAsStrictIJson
@Bindable(defaultValue="false") default boolean isWriteDateTimesAsStrictIJson()Control whether date/time values are written in JSON-B strict I-JSON temporal form.- Returns:
- Whether date/time values use strict I-JSON temporal formatting
- Since:
- 3.1.0
-
getLocale
-
getTimeZone
-
getIncludedIntrospectionPackages
-
getMaximumNestingDepth
@Bindable(defaultValue="1024") int getMaximumNestingDepth()The maximum nesting depth for serialization and deserialization.- Returns:
- The maximum nesting depth for serialization and deserialization
- Since:
- 2.0.0
-
getPropertyNamingStrategyName
- Returns:
- The property naming strategy name
- Since:
- 2.10
-
getPropertyNamingStrategy
- Returns:
- The property naming strategy
- Since:
- 2.10
-
isJsonViewEnabled
default boolean isJsonViewEnabled()Whentrue, mappers should respect JsonView annotations on arguments passed to read/write methods.- Returns:
- Whether to respect view annotations
- Since:
- 2.12
-