elect
02/16/2024, 11:38 AMEdoardo Luppi
02/18/2024, 1:00 PMelect
02/19/2024, 9:34 AMobject EventTypeSerializer : KSerializer<EventType> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("java.time.Instant", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: EventType) = TODO()
override fun deserialize(decoder: Decoder): EventType = EventType of decoder.decodeString()
}
and then @file:UseSerializers(EventTypeSerializer::class)
where you need, but this defy the point of using a JSON parser in the first place..Edoardo Luppi
02/19/2024, 9:52 AMelect
02/19/2024, 9:52 AM