From d7aeb3392a719ca61bf9cbd3375d95bb8864d9cc Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Sat, 28 Sep 2019 10:27:31 +0200 Subject: [PATCH] Mappers: Use the new explicit JsonMapper This is more speaking than using the generic ObjectMapper here, also see https://github.com/FasterXML/jackson-databind/issues/2153. Signed-off-by: Sebastian Schuberth --- model/src/main/kotlin/Mappers.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/src/main/kotlin/Mappers.kt b/model/src/main/kotlin/Mappers.kt index 2ad334517304..ec0c9f893646 100644 --- a/model/src/main/kotlin/Mappers.kt +++ b/model/src/main/kotlin/Mappers.kt @@ -23,6 +23,7 @@ import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.PropertyNamingStrategy import com.fasterxml.jackson.databind.SerializationFeature +import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.databind.node.MissingNode import com.fasterxml.jackson.dataformat.xml.XmlMapper import com.fasterxml.jackson.dataformat.yaml.YAMLMapper @@ -43,7 +44,7 @@ private val mapperConfig: ObjectMapper.() -> Unit = { propertyNamingStrategy = PROPERTY_NAMING_STRATEGY } -val jsonMapper = ObjectMapper().apply(mapperConfig) +val jsonMapper = JsonMapper().apply(mapperConfig) val xmlMapper = XmlMapper().apply(mapperConfig) val yamlMapper = YAMLMapper().apply(mapperConfig)