com.lsdconsulting.generatorui.config.objectmapper.ObjectMapperCreator.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lsd-distributed-generator-ui-service Show documentation
Show all versions of lsd-distributed-generator-ui-service Show documentation
This is the graphical interface providing the LSD generation functionality.
The newest version!
package com.lsdconsulting.generatorui.config.objectmapper
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
class ObjectMapperCreator {
fun create(): ObjectMapper {
val mapper = ObjectMapper()
mapper.registerModule(KotlinModule.Builder().build())
mapper.registerModule(JavaTimeModule())
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
return mapper
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy