java.lang.Object
io.github.astrapi69.json.factory.ObjectMapperFactory
The factory class
ObjectMapperFactory
for creating ObjectMapper
objects-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapper
Factory method for create a newObjectMapper
static com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper
(boolean newMapper) Factory method for create a newObjectMapper
.static com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper
(com.fasterxml.jackson.core.JsonFactory jsonFactory) Factory method for create a newObjectMapper
with the givenJsonFactory
static com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper
(Map<com.fasterxml.jackson.core.JsonParser.Feature, Boolean> jsonParserFeatures) Factory method for create a newObjectMapper
with the given map of json parser featuresstatic com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper
(Map<com.fasterxml.jackson.core.JsonParser.Feature, Boolean> jsonParserFeatures, Map<com.fasterxml.jackson.core.JsonGenerator.Feature, Boolean> jsonGeneratorFeatures, Map<com.fasterxml.jackson.databind.DeserializationFeature, Boolean> deserializationFeatures, Map<com.fasterxml.jackson.databind.SerializationFeature, Boolean> serializationFeatures, Map<com.fasterxml.jackson.databind.cfg.DatatypeFeature, Boolean> datatypeFeatures) Factory method for create a newObjectMapper
with the given features
-
Method Details
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()Factory method for create a newObjectMapper
- Returns:
- the new
ObjectMapper
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(boolean newMapper) Factory method for create a newObjectMapper
. If the given flag is true a newObjectMapper
will be created otherwise the defaultObjectMapper
will be taken.- Parameters:
newMapper
- flag that indicates if a newObjectMapper
should be created, if true a newObjectMapper
will be created otherwise the defaultObjectMapper
from this class will be returned.- Returns:
- the new
ObjectMapper
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(Map<com.fasterxml.jackson.core.JsonParser.Feature, Boolean> jsonParserFeatures) Factory method for create a newObjectMapper
with the given map of json parser features- Parameters:
jsonParserFeatures
- the map with the json parser features for the newObjectMapper
- Returns:
- the new
ObjectMapper
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(Map<com.fasterxml.jackson.core.JsonParser.Feature, Boolean> jsonParserFeatures, Map<com.fasterxml.jackson.core.JsonGenerator.Feature, Boolean> jsonGeneratorFeatures, Map<com.fasterxml.jackson.databind.DeserializationFeature, Boolean> deserializationFeatures, Map<com.fasterxml.jackson.databind.SerializationFeature, Boolean> serializationFeatures, Map<com.fasterxml.jackson.databind.cfg.DatatypeFeature, Boolean> datatypeFeatures) Factory method for create a newObjectMapper
with the given features- Parameters:
jsonParserFeatures
- the map with the json parser features for the newObjectMapper
jsonGeneratorFeatures
- the map with the json generator features for the newObjectMapper
deserializationFeatures
- the map with the json deserialization features for the newObjectMapper
serializationFeatures
- the map with the json serialization features for the newObjectMapper
datatypeFeatures
- the map with the datatype features for the newObjectMapper
- Returns:
- the new
ObjectMapper
-
newObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(com.fasterxml.jackson.core.JsonFactory jsonFactory) Factory method for create a newObjectMapper
with the givenJsonFactory
- Parameters:
jsonFactory
- theJsonFactory
object- Returns:
- the new
ObjectMapper
-