https://kotlinlang.org logo
#ktor
Title
# ktor
i

Ivan Brko

04/30/2020, 4:42 PM
Hi all, I am using ktor with kotlinx.serialization (for a server application), and I am not much familiar with neither one of those. I have a data class that has a field of type LocalDateTime, it doesn't have a default serializer so I wrote it, but is there a way I could register a serializer in ktor for a class so that I don't always have to write the following when some data class has a property of that type?
Copy code
@Serializable(with = LocalDateTimeSerializer::class)
i

Ivan Brko

04/30/2020, 7:05 PM
Thanks, I will check that out
4 Views