EnumIgnoreUnknownSerializer

abstract class EnumIgnoreUnknownSerializer<T : Enum<T>>(values: Array<out T>, defaultValue: T) : KSerializer<T>

Parses an enum using values, and on unknown values, falls back to defaultValue.

Constructors

Link copied to clipboard
constructor(values: Array<out T>, defaultValue: T)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): T
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: T)