diff options
Diffstat (limited to 'common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java')
-rw-r--r-- | common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java index f9857424a2..72b01c268e 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java @@ -21,7 +21,6 @@ package org.onap.so.client.graphinventory; import org.onap.so.client.policy.CommonObjectMapperProvider; - import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.AnnotationIntrospector; @@ -35,18 +34,18 @@ import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; public class GraphInventoryCommonObjectMapperProvider extends CommonObjectMapperProvider { - public GraphInventoryCommonObjectMapperProvider() { - mapper = new ObjectMapper(); - mapper.setSerializationInclusion(Include.NON_NULL); - mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); - mapper.enable(MapperFeature.USE_ANNOTATIONS); - mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); - mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - AnnotationIntrospector aiJaxb = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()); + public GraphInventoryCommonObjectMapperProvider() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(Include.NON_NULL); + mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + mapper.enable(MapperFeature.USE_ANNOTATIONS); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + AnnotationIntrospector aiJaxb = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()); AnnotationIntrospector aiJackson = new JacksonAnnotationIntrospector(); // first Jaxb, second Jackson annotations mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(aiJaxb, aiJackson)); - } + } } |