DatePeriodComponentSerializer

object DatePeriodComponentSerializer : KSerializer<DatePeriod>

A serializer for DatePeriod that uses a different field for each component, only listing non-zero components.

Deserializes the time components as well when they are present ensuring they are zero.

JSON example: {"months":1,"days":15}

Functions

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

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor