NepaliCalendarEventSerializer

KSerializer for NepaliCalendarEvent, written as {"date": "2082-01-01", "name": "...", "kind": "..."}.

The date reuses SimpleDateSerializer's string form and the kind reuses NepaliEventKindSerializer's name, so a cached event list reads the same way as every other date the library persists. Those three are required: an entry without a date has nowhere to be drawn, and one without a kind has no colour.

closesOffices is written only when it disagrees with what the kind usually means, and id and payload only when they are set, so the common entry stays three fields wide. Reading back fills each of them the way the constructor would.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

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