Class 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.

    • Constructor Detail

      • JacksonUtil

        public JacksonUtil()
    • 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 configure
        withCustomizers - setting to include customizers for primary mapping