DateTimeUnitSerializer

object DateTimeUnitSerializer : AbstractPolymorphicSerializer<DateTimeUnit> (source)

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}

Properties

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

Functions

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