Package org.ehrbase.serialisation
Class JacksonUtil
- java.lang.Object
-
- org.ehrbase.serialisation.JacksonUtil
-
public class JacksonUtil extends Object
Class to obtain an ObjectMapper that works with both archie RM and AOM objects, serializing into a JSON with openEHR-spec type names.When a standard is agreed upon in the openEHR-specs, this format will likely change.
Created by pieter.bos on 30/06/16.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJacksonUtil.EhrStatusDeserializerCustom deserializer forEhrStatusobjects.
-
Constructor Summary
Constructors Constructor Description JacksonUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean withCustomizers)Configure an existing object mapper to work with Archie RM and AOM Objects.static com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()Get an object mapper that works with Archie RM and AOM objects.
-
-
-
Method Detail
-
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Get an object mapper that works with Archie RM and AOM objects. It will be cached in a static variable for performance reasons- Returns:
-
configureObjectMapper
public static void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean withCustomizers)Configure an existing object mapper to work with Archie RM and AOM Objects. Indentation is enabled. Feel free to disable again in your own code.- Parameters:
objectMapper- target mapper to configurewithCustomizers- setting to include customizers for primary mapping
-
-