install(DataConversion) {
convertTime()
}
You can also install converters of specific types.
install(DataConversion) {
convertLocalDate()
convertLocalDateTime()
convertOffsetDateTime()
}
The actual serialization/deserialization is delegated to some specialized mapper. This library just offers a ktor data conversion wrapper over it.
Jackson is used as default serializer. You can also pass your own ObjectMapper
instance to all convert*
functions.
Warning
|
Jackson does not support JSR310 Java Time types by default. You need to register JavaTimeModule :ObjectMapper().registerModule(JavaTimeModule())
|