DatePeriodIso8601Serializer

object DatePeriodIso8601Serializer : KSerializer<DatePeriod>

A serializer for DatePeriod that represents it as an ISO-8601 duration string.

Deserializes the time components as well, as long as they are zero.

JSON example: "P2Y1M"

See also

kotlinx.datetime.DatePeriod

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