Package io.dropwizard.jackson
Class Jackson
- java.lang.Object
-
- io.dropwizard.jackson.Jackson
-
public class Jackson extends Object
A utility class for Jackson.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.ObjectMapper
newMinimalObjectMapper()
Creates a new minimalObjectMapper
that will work with Dropwizard out of box.static com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper()
Creates a newObjectMapper
with Guava and Logback support, as well as support forJsonSnakeCase
.static com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper(@Nullable com.fasterxml.jackson.core.JsonFactory jsonFactory)
Creates a newObjectMapper
with a customJsonFactory
with Guava and Logback support, as well as support forJsonSnakeCase
.
-
-
-
Method Detail
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
Creates a newObjectMapper
with Guava and Logback support, as well as support forJsonSnakeCase
. Also includes allDiscoverable
interface implementations.- Returns:
- the configured
ObjectMapper
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(@Nullable com.fasterxml.jackson.core.JsonFactory jsonFactory)
Creates a newObjectMapper
with a customJsonFactory
with Guava and Logback support, as well as support forJsonSnakeCase
. Also includes allDiscoverable
interface implementations.- Parameters:
jsonFactory
- instance ofJsonFactory
to use for the createdObjectMapper
instance.- Returns:
- the configured
ObjectMapper
-
newMinimalObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newMinimalObjectMapper()
Creates a new minimalObjectMapper
that will work with Dropwizard out of box.NOTE: Use it, if the default Dropwizard's
ObjectMapper
, created innewObjectMapper()
, is too aggressive for you.- Returns:
- the configured
ObjectMapper
-
-