Class Jackson


  • public class Jackson
    extends Object
    A utility class for Jackson.
    • Method Detail

      • newObjectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
        Creates a new ObjectMapper with Guava and Logback support, as well as support for JsonSnakeCase. Also includes all Discoverable interface implementations.
        Returns:
        the configured ObjectMapper
      • newObjectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper​(@Nullable com.fasterxml.jackson.core.JsonFactory jsonFactory)
        Creates a new ObjectMapper with a custom JsonFactory with Guava and Logback support, as well as support for JsonSnakeCase. Also includes all Discoverable interface implementations.
        Parameters:
        jsonFactory - instance of JsonFactory to use for the created ObjectMapper instance.
        Returns:
        the configured ObjectMapper
      • newMinimalObjectMapper

        public static com.fasterxml.jackson.databind.ObjectMapper newMinimalObjectMapper()
        Creates a new minimal ObjectMapper that will work with Dropwizard out of box.

        NOTE: Use it, if the default Dropwizard's ObjectMapper, created in newObjectMapper(), is too aggressive for you.

        Returns:
        the configured ObjectMapper