NumericEnumSerializer

Custom serializer for numeric enum fields that converts JsonElement values to Double during deserialization.

During deserialization:

  • JsonPrimitive numbers → converted to Double

  • JsonPrimitive strings → parsed to Double if possible, otherwise error

  • Other types → error

During serialization, converts List back to JsonArray of JsonPrimitive numbers.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): List<Double>?
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: List<Double>?)