hi everyone, I'm using java.time.LocalDateTime as ...
# exposed
f
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?
a
You need a plugin for that
Copy code
implementation("org.jetbrains.exposed:exposed-java-time")
a
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
so are you telling me that it is not embedded in kotlin core library?
@Andrew O'Hara added the exposed-java-time dependency, but it seems not working too, I have the same error
@Andromadus Naruto what about the Table type to use to manage the LocalDateTime?
206 Views