Skip to content

Commit

Permalink
Mappers: Use the new explicit JsonMapper
Browse files Browse the repository at this point in the history
This is more speaking than using the generic ObjectMapper here, also see
FasterXML/jackson-databind#2153.

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch-si.com>
  • Loading branch information
sschuberth committed Oct 7, 2019
1 parent bdab744 commit d7aeb33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/src/main/kotlin/Mappers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit d7aeb33

Please sign in to comment.