Class ObjectMapperFactory

java.lang.Object
io.github.astrapi69.json.factory.ObjectMapperFactory

public final class ObjectMapperFactory extends Object
The factory class ObjectMapperFactory for creating ObjectMapper objects
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.fasterxml.jackson.databind.ObjectMapper
    Factory method for create a new ObjectMapper
    static com.fasterxml.jackson.databind.ObjectMapper
    newObjectMapper(boolean newMapper)
    Factory method for create a new ObjectMapper.
    static com.fasterxml.jackson.databind.ObjectMapper
    newObjectMapper(com.fasterxml.jackson.core.JsonFactory jsonFactory)
    Factory method for create a new ObjectMapper with the given JsonFactory
    static com.fasterxml.jackson.databind.ObjectMapper
    newObjectMapper(Map<com.fasterxml.jackson.core.JsonParser.Feature,Boolean> jsonParserFeatures)
    Factory method for create a new ObjectMapper with the given map of json parser features
    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 new ObjectMapper with the given features

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newObjectMapper

      public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
      Factory method for create a new ObjectMapper
      Returns:
      the new ObjectMapper
    • newObjectMapper

      public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(boolean newMapper)
      Factory method for create a new ObjectMapper. If the given flag is true a new ObjectMapper will be created otherwise the default ObjectMapper will be taken.
      Parameters:
      newMapper - flag that indicates if a new ObjectMapper should be created, if true a new ObjectMapper will be created otherwise the default ObjectMapper 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 new ObjectMapper with the given map of json parser features
      Parameters:
      jsonParserFeatures - the map with the json parser features for the new ObjectMapper
      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 new ObjectMapper with the given features
      Parameters:
      jsonParserFeatures - the map with the json parser features for the new ObjectMapper
      jsonGeneratorFeatures - the map with the json generator features for the new ObjectMapper
      deserializationFeatures - the map with the json deserialization features for the new ObjectMapper
      serializationFeatures - the map with the json serialization features for the new ObjectMapper
      datatypeFeatures - the map with the datatype features for the new ObjectMapper
      Returns:
      the new ObjectMapper
    • newObjectMapper

      public static com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(com.fasterxml.jackson.core.JsonFactory jsonFactory)
      Factory method for create a new ObjectMapper with the given JsonFactory
      Parameters:
      jsonFactory - the JsonFactory object
      Returns:
      the new ObjectMapper