hi everyone, I'm using java.time.LocalDateTime as type of a field in a data class, with @Serializable annotation, but I've the following error:
Serializer has not been found for type 'LocalDateTime?'. To use context serializer as fallback, explicitly annotate type or property with @Contextual
do I need to create a custom serializer for this type?
You seem to need the KotlinX Datetime library. It is has a serializer for KotlinX Serialisation as well as extension methods to convert to and from java.time.LocalDateTime.
f
Francesco Di Sciascio
11/06/2022, 7:57 PM
so are you telling me that it is not embedded in kotlin core library?
Francesco Di Sciascio
11/06/2022, 8:20 PM
@Andrew O'Hara added the exposed-java-time dependency, but it seems not working too, I have the same error
Francesco Di Sciascio
11/06/2022, 8:38 PM
@Andromadus Naruto what about the Table type to use to manage the LocalDateTime?