Record Class MicronautJsonbProvider.JsonbSerdeConfiguration
java.lang.Object
java.lang.Record
io.micronaut.serde.jsonb.MicronautJsonbProvider.JsonbSerdeConfiguration
- All Implemented Interfaces:
SerdeConfiguration
- Enclosing class:
MicronautJsonbProvider
protected static record MicronautJsonbProvider.JsonbSerdeConfiguration(jakarta.json.bind.JsonbConfig jsonbConfig, SerdeConfiguration delegate)
extends Record
implements SerdeConfiguration
- Since:
- 3.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface SerdeConfiguration
SerdeConfiguration.NumericTimeUnit, SerdeConfiguration.TimeShape -
Field Summary
Fields inherited from interface SerdeConfiguration
DEFAULT_INET_ADDRESS_AS_NUMERIC, PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJsonbSerdeConfiguration(jakarta.json.bind.JsonbConfig jsonbConfig, SerdeConfiguration delegate) Creates an instance of aJsonbSerdeConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.The 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.@Nullable StringShape for serializing dates.final inthashCode()Returns a hash code value for this object.booleanbooleanWhentrue, mappers should respect JsonView annotations on arguments passed to read/write methods.booleanControl whether deprecated three-letter time zone IDs are rejected.booleanControl whether to use legacy behavior for writing byte arrays.booleanControl whether date/time values are written in JSON-B strict I-JSON temporal form.booleanControl whetherDurationvalues are written and read as ISO-8601 strings.booleanControl whetherDatevalues are written with the configured time zone id.jakarta.json.bind.JsonbConfigReturns the value of thejsonbConfigrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface SerdeConfiguration
getPropertyNamingStrategy
-
Constructor Details
-
JsonbSerdeConfiguration
protected JsonbSerdeConfiguration(jakarta.json.bind.JsonbConfig jsonbConfig, SerdeConfiguration delegate) Creates an instance of aJsonbSerdeConfigurationrecord class.- Parameters:
jsonbConfig- the value for thejsonbConfigrecord componentdelegate- the value for thedelegaterecord component
-
-
Method Details
-
getDateFormat
Description copied from interface:SerdeConfigurationThe date format to use when serializing and deserializing dates.- Specified by:
getDateFormatin interfaceSerdeConfiguration- Returns:
- the date format to use
-
getTimeWriteShape
Description copied from interface:SerdeConfigurationShape for serializing dates.- Specified by:
getTimeWriteShapein interfaceSerdeConfiguration- Returns:
- The date serialization shape
-
getNumericTimeUnit
Description copied from interface:SerdeConfigurationThe unit to use for serializing and deserializing dates to or from numbers. Note thatLocalDatealways uses the epoch day, regardless of this setting.- Specified by:
getNumericTimeUnitin interfaceSerdeConfiguration- Returns:
- The time unit
-
isWriteBinaryAsArray
public boolean isWriteBinaryAsArray()Description copied from interface:SerdeConfigurationControl 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.- Specified by:
isWriteBinaryAsArrayin interfaceSerdeConfiguration- Returns:
- Whether to use legacy byte array writing behavior
-
isWriteDurationsAsStrings
public boolean isWriteDurationsAsStrings()Description copied from interface:SerdeConfigurationControl whetherDurationvalues are written and read as ISO-8601 strings.- Specified by:
isWriteDurationsAsStringsin interfaceSerdeConfiguration- Returns:
- Whether durations are represented as strings
-
isWriteJavaUtilDatesWithZoneId
public boolean isWriteJavaUtilDatesWithZoneId()Description copied from interface:SerdeConfigurationControl whetherDatevalues are written with the configured time zone id.- Specified by:
isWriteJavaUtilDatesWithZoneIdin interfaceSerdeConfiguration- Returns:
- Whether dates include a zone id
-
isRejectDeprecatedThreeLetterTimeZoneIds
public boolean isRejectDeprecatedThreeLetterTimeZoneIds()Description copied from interface:SerdeConfigurationControl whether deprecated three-letter time zone IDs are rejected.- Specified by:
isRejectDeprecatedThreeLetterTimeZoneIdsin interfaceSerdeConfiguration- Returns:
- Whether deprecated time zone IDs are rejected
-
isWriteDateTimesAsStrictIJson
public boolean isWriteDateTimesAsStrictIJson()Description copied from interface:SerdeConfigurationControl whether date/time values are written in JSON-B strict I-JSON temporal form.- Specified by:
isWriteDateTimesAsStrictIJsonin interfaceSerdeConfiguration- Returns:
- Whether date/time values use strict I-JSON temporal formatting
-
getLocale
- Specified by:
getLocalein interfaceSerdeConfiguration- Returns:
- The default locale to use.
-
getTimeZone
- Specified by:
getTimeZonein interfaceSerdeConfiguration- Returns:
- The default time zone to use.
-
getIncludedIntrospectionPackages
Description copied from interface:SerdeConfigurationThe packages containing introspections that should be regarded as serializable by default without the need to add theSerdeableannotation.- Specified by:
getIncludedIntrospectionPackagesin interfaceSerdeConfiguration- Returns:
- the packages to include
-
getMaximumNestingDepth
public int getMaximumNestingDepth()Description copied from interface:SerdeConfigurationThe maximum nesting depth for serialization and deserialization.- Specified by:
getMaximumNestingDepthin interfaceSerdeConfiguration- Returns:
- The maximum nesting depth for serialization and deserialization
-
isInetAddressAsNumeric
public boolean isInetAddressAsNumeric()- Specified by:
isInetAddressAsNumericin interfaceSerdeConfiguration- Returns:
- Whether to use
InetAddress.getHostAddress()when serializingInetAddress.
-
getPropertyNamingStrategyName
- Specified by:
getPropertyNamingStrategyNamein interfaceSerdeConfiguration- Returns:
- The property naming strategy name
-
isJsonViewEnabled
public boolean isJsonViewEnabled()Description copied from interface:SerdeConfigurationWhentrue, mappers should respect JsonView annotations on arguments passed to read/write methods.- Specified by:
isJsonViewEnabledin interfaceSerdeConfiguration- Returns:
- Whether to respect view annotations
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
jsonbConfig
public jakarta.json.bind.JsonbConfig jsonbConfig()Returns the value of thejsonbConfigrecord component.- Returns:
- the value of the
jsonbConfigrecord component
-
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-