Class KobbyKotlinDtoSerializationExtension

  • All Implemented Interfaces:

    
    public class KobbyKotlinDtoSerializationExtension
    
                        

    Configuration of Kotlinx Serialization support for DTO classes.

    Note that Kotlinx serialization and Jackson serialization are not supported simultaneously.

    • Constructor Detail

      • KobbyKotlinDtoSerializationExtension

        KobbyKotlinDtoSerializationExtension()
    • Method Detail

      • getEnabled

         final Boolean getEnabled()

        Is Kotlinx Serialization enabled. Note that Kotlinx serialization and Jackson serialization are not supported simultaneously.

        By default, "true" if "org.jetbrains.kotlinx:kotlinx-serialization-json" artifact is in the project dependencies.

      • setEnabled

         final Unit setEnabled(Boolean enabled)

        Is Kotlinx Serialization enabled. Note that Kotlinx serialization and Jackson serialization are not supported simultaneously.

        By default, "true" if "org.jetbrains.kotlinx:kotlinx-serialization-json" artifact is in the project dependencies.

      • getClassDiscriminator

         final String getClassDiscriminator()

        Name of the class descriptor property for polymorphic serialization.

        Default: "__typename"

      • setClassDiscriminator

         final Unit setClassDiscriminator(String classDiscriminator)

        Name of the class descriptor property for polymorphic serialization.

        Default: "__typename"

      • getIgnoreUnknownKeys

         final Boolean getIgnoreUnknownKeys()

        Specifies whether encounters of unknown properties in the input JSON should be ignored instead of throwing SerializationException.

        Default: true

      • setIgnoreUnknownKeys

         final Unit setIgnoreUnknownKeys(Boolean ignoreUnknownKeys)

        Specifies whether encounters of unknown properties in the input JSON should be ignored instead of throwing SerializationException.

        Default: true

      • getEncodeDefaults

         final Boolean getEncodeDefaults()

        Specifies whether default values of Kotlin properties should be encoded to JSON.

        Default: false

      • setEncodeDefaults

         final Unit setEncodeDefaults(Boolean encodeDefaults)

        Specifies whether default values of Kotlin properties should be encoded to JSON.

        Default: false

      • getPrettyPrint

         final Boolean getPrettyPrint()

        Specifies whether resulting JSON should be pretty-printed.

        Default: false

      • setPrettyPrint

         final Unit setPrettyPrint(Boolean prettyPrint)

        Specifies whether resulting JSON should be pretty-printed.

        Default: false