Package io.micronaut.serde.config
Interface SerdeConfiguration
public interface SerdeConfiguration
- Author:
- gkrocher
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Time unit to use when deserializing a numeric value, or when serializing to a numeric value as configured bygetTimeWriteShape()
.static enum
Shape to use for time serialization. -
Field Summary
-
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 theSerdeable
annotation.int
The maximum nesting depth for serialization and deserialization.The unit to use for serializing and deserializing dates to or from numbers.Shape for serializing dates.default boolean
boolean
Control whether to use legacy behavior for writing byte arrays.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_INET_ADDRESS_AS_NUMERIC
static final boolean DEFAULT_INET_ADDRESS_AS_NUMERIC- See Also:
-
-
Method Details
-
getDateFormat
The date format to use when serializing and deserializing dates.- Returns:
- the date format to use
-
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 thatLocalDate
always 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
-
getLocale
- Returns:
- The default locale to use.
-
getTimeZone
- Returns:
- The default time zone to use.
-
getIncludedIntrospectionPackages
The packages containing introspections that should be regarded as serializable by default without the need to add theSerdeable
annotation.- Returns:
- the packages to include
-
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
-