Package org.apache.drill.common.util
Class JacksonUtils
java.lang.Object
org.apache.drill.common.util.JacksonUtils
Utility class which contain methods for interacting with Jackson.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.json.JsonMapper.BuilderCreates a new instance of the JacksonJsonMapper.Builder.static com.fasterxml.jackson.databind.json.JsonMapper.BuildercreateJsonMapperBuilder(com.fasterxml.jackson.core.JsonFactory factory) Creates a new instance of the JacksonJsonMapper.Builder.static com.fasterxml.jackson.databind.ObjectMapperCreates a new instance of the JacksonObjectMapper.static com.fasterxml.jackson.databind.ObjectMappercreateObjectMapper(com.fasterxml.jackson.core.JsonFactory factory) Creates a new instance of the JacksonObjectMapper.
-
Method Details
-
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()Creates a new instance of the JacksonObjectMapper.- Returns:
- an
ObjectMapperinstance
-
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(com.fasterxml.jackson.core.JsonFactory factory) Creates a new instance of the JacksonObjectMapper.- Parameters:
factory- aJsonFactoryinstance- Returns:
- an
ObjectMapperinstance
-
createJsonMapperBuilder
public static com.fasterxml.jackson.databind.json.JsonMapper.Builder createJsonMapperBuilder()Creates a new instance of the JacksonJsonMapper.Builder.- Returns:
- an
JsonMapper.Builderinstance
-
createJsonMapperBuilder
public static com.fasterxml.jackson.databind.json.JsonMapper.Builder createJsonMapperBuilder(com.fasterxml.jackson.core.JsonFactory factory) Creates a new instance of the JacksonJsonMapper.Builder.- Parameters:
factory- aJsonFactoryinstance- Returns:
- an
JsonMapper.Builderinstance
-