DateTimeUnitSerializer

object DateTimeUnitSerializer : AbstractPolymorphicSerializer<DateTimeUnit>

A polymorphic serializer for DateTimeUnit that represents the unit as the Int number of months or days, or the Long number of nanoseconds.

JSON example: {"type":"MonthBased","days":15}

Functions

Link copied to clipboard
override fun deserialize(decoder: Decoder): DateTimeUnit
Link copied to clipboard
open override fun findPolymorphicSerializerOrNull(decoder: CompositeDecoder, klassName: String?): DeserializationStrategy<out DateTimeUnit>?
open override fun findPolymorphicSerializerOrNull(encoder: Encoder, value: DateTimeUnit): SerializationStrategy<DateTimeUnit>?
Link copied to clipboard
override fun serialize(encoder: Encoder, value: DateTimeUnit)

Properties

Link copied to clipboard
open override val baseClass: KClass<DateTimeUnit>
Link copied to clipboard
open override val descriptor: SerialDescriptor