You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
849 B
Kotlin

package wf.servitor.common.workflow
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.PropertyNamingStrategy
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import wf.servitor.common.utils.JacksonModule
object Jackson {
val yaml = ObjectMapper(YAMLFactory()).apply {
registerKotlinModule()
registerModule(JacksonModule)
disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
propertyNamingStrategy = PropertyNamingStrategy.LOWER_CAMEL_CASE
}
val json = ObjectMapper().apply {
registerKotlinModule()
registerModule(JacksonModule)
propertyNamingStrategy = PropertyNamingStrategy.LOWER_CAMEL_CASE
}
}