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
  • Constructor Details

    • JsonbSerdeConfiguration

      protected JsonbSerdeConfiguration(jakarta.json.bind.JsonbConfig jsonbConfig, SerdeConfiguration delegate)
      Creates an instance of a JsonbSerdeConfiguration record class.
      Parameters:
      jsonbConfig - the value for the jsonbConfig record component
      delegate - the value for the delegate record component
  • Method Details

    • getDateFormat

      public Optional<String> getDateFormat()
      Description copied from interface: SerdeConfiguration
      The date format to use when serializing and deserializing dates.
      Specified by:
      getDateFormat in interface SerdeConfiguration
      Returns:
      the date format to use
    • getTimeWriteShape

      public SerdeConfiguration.TimeShape getTimeWriteShape()
      Description copied from interface: SerdeConfiguration
      Shape for serializing dates.
      Specified by:
      getTimeWriteShape in interface SerdeConfiguration
      Returns:
      The date serialization shape
    • getNumericTimeUnit

      public SerdeConfiguration.NumericTimeUnit getNumericTimeUnit()
      Description copied from interface: SerdeConfiguration
      The unit to use for serializing and deserializing dates to or from numbers. Note that LocalDate always uses the epoch day, regardless of this setting.
      Specified by:
      getNumericTimeUnit in interface SerdeConfiguration
      Returns:
      The time unit
    • isWriteBinaryAsArray

      public boolean isWriteBinaryAsArray()
      Description copied from interface: SerdeConfiguration
      Control whether to use legacy behavior for writing byte arrays. When set to true (the default in serde 2.x), byte arrays will always be written as arrays of numbers. When set to false, the encoding may be format-specific instead, and will be a base64 string for JSON.
      Specified by:
      isWriteBinaryAsArray in interface SerdeConfiguration
      Returns:
      Whether to use legacy byte array writing behavior
    • isWriteDurationsAsStrings

      public boolean isWriteDurationsAsStrings()
      Description copied from interface: SerdeConfiguration
      Control whether Duration values are written and read as ISO-8601 strings.
      Specified by:
      isWriteDurationsAsStrings in interface SerdeConfiguration
      Returns:
      Whether durations are represented as strings
    • isWriteJavaUtilDatesWithZoneId

      public boolean isWriteJavaUtilDatesWithZoneId()
      Description copied from interface: SerdeConfiguration
      Control whether Date values are written with the configured time zone id.
      Specified by:
      isWriteJavaUtilDatesWithZoneId in interface SerdeConfiguration
      Returns:
      Whether dates include a zone id
    • isRejectDeprecatedThreeLetterTimeZoneIds

      public boolean isRejectDeprecatedThreeLetterTimeZoneIds()
      Description copied from interface: SerdeConfiguration
      Control whether deprecated three-letter time zone IDs are rejected.
      Specified by:
      isRejectDeprecatedThreeLetterTimeZoneIds in interface SerdeConfiguration
      Returns:
      Whether deprecated time zone IDs are rejected
    • isWriteDateTimesAsStrictIJson

      public boolean isWriteDateTimesAsStrictIJson()
      Description copied from interface: SerdeConfiguration
      Control whether date/time values are written in JSON-B strict I-JSON temporal form.
      Specified by:
      isWriteDateTimesAsStrictIJson in interface SerdeConfiguration
      Returns:
      Whether date/time values use strict I-JSON temporal formatting
    • getLocale

      public Optional<Locale> getLocale()
      Specified by:
      getLocale in interface SerdeConfiguration
      Returns:
      The default locale to use.
    • getTimeZone

      public Optional<TimeZone> getTimeZone()
      Specified by:
      getTimeZone in interface SerdeConfiguration
      Returns:
      The default time zone to use.
    • getIncludedIntrospectionPackages

      public List<String> getIncludedIntrospectionPackages()
      Description copied from interface: SerdeConfiguration
      The packages containing introspections that should be regarded as serializable by default without the need to add the Serdeable annotation.
      Specified by:
      getIncludedIntrospectionPackages in interface SerdeConfiguration
      Returns:
      the packages to include
    • getMaximumNestingDepth

      public int getMaximumNestingDepth()
      Description copied from interface: SerdeConfiguration
      The maximum nesting depth for serialization and deserialization.
      Specified by:
      getMaximumNestingDepth in interface SerdeConfiguration
      Returns:
      The maximum nesting depth for serialization and deserialization
    • isInetAddressAsNumeric

      public boolean isInetAddressAsNumeric()
      Specified by:
      isInetAddressAsNumeric in interface SerdeConfiguration
      Returns:
      Whether to use InetAddress.getHostAddress() when serializing InetAddress.
    • getPropertyNamingStrategyName

      public @Nullable String getPropertyNamingStrategyName()
      Specified by:
      getPropertyNamingStrategyName in interface SerdeConfiguration
      Returns:
      The property naming strategy name
    • isJsonViewEnabled

      public boolean isJsonViewEnabled()
      Description copied from interface: SerdeConfiguration
      When true, mappers should respect JsonView annotations on arguments passed to read/write methods.
      Specified by:
      isJsonViewEnabled in interface SerdeConfiguration
      Returns:
      Whether to respect view annotations
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • jsonbConfig

      public jakarta.json.bind.JsonbConfig jsonbConfig()
      Returns the value of the jsonbConfig record component.
      Returns:
      the value of the jsonbConfig record component
    • delegate

      public SerdeConfiguration delegate()
      Returns the value of the delegate record component.
      Returns:
      the value of the delegate record component