Uses of Class
org.codehaus.jackson.map.ObjectMapper
-
Packages that use ObjectMapper Package Description org.codehaus.jackson.jaxrs Jackson-based JAX-RS provider that can automatically serialize and deserialize resources for JSON content type (MediaType).org.codehaus.jackson.map Contains basic mapper (conversion) functionality that allows for converting between regular streaming json content and Java objects (beans or Tree Model: support for both is viaObjectMapper
class, as well as convenience methods included inJsonParser
-
-
Uses of ObjectMapper in org.codehaus.jackson.jaxrs
Fields in org.codehaus.jackson.jaxrs declared as ObjectMapper Modifier and Type Field Description protected ObjectMapper
MapperConfigurator. _defaultMapper
If no mapper was specified when constructed, and no configuration calls are made, a default mapper is constructed.protected ObjectMapper
MapperConfigurator. _mapper
Mapper provider was constructed with if any, or that was constructed due to a call to explicitly configure mapper.Methods in org.codehaus.jackson.jaxrs that return ObjectMapper Modifier and Type Method Description ObjectMapper
MapperConfigurator. getConfiguredMapper()
Method that locates, configures and returnsObjectMapper
to useObjectMapper
MapperConfigurator. getDefaultMapper()
ObjectMapper
JacksonJsonProvider. locateMapper(java.lang.Class<?> type, javax.ws.rs.core.MediaType mediaType)
Method called to locateObjectMapper
to use for serialization and deserialization.protected ObjectMapper
MapperConfigurator. mapper()
Helper method that will ensure that there is a configurable non-default mapper (constructing an instance if one didn't yet exit), and return that mapper.Methods in org.codehaus.jackson.jaxrs with parameters of type ObjectMapper Modifier and Type Method Description protected java.lang.Class<?>
JacksonJsonProvider. _findView(ObjectMapper mapper, java.lang.annotation.Annotation[] annotations)
protected void
MapperConfigurator. _setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse)
void
JacksonJsonProvider. setMapper(ObjectMapper m)
Method that can be used to directly defineObjectMapper
to use for serialization and deserialization; if null, will use the standard provider discovery from context instead.void
MapperConfigurator. setMapper(ObjectMapper m)
Constructors in org.codehaus.jackson.jaxrs with parameters of type ObjectMapper Constructor Description JacksonJaxbJsonProvider(ObjectMapper mapper, Annotations[] annotationsToUse)
Constructor to use when a custom mapper (usually components like serializer/deserializer factories that have been configured) is to be used.JacksonJsonProvider(ObjectMapper mapper)
JacksonJsonProvider(ObjectMapper mapper, Annotations[] annotationsToUse)
Constructor to use when a custom mapper (usually components like serializer/deserializer factories that have been configured) is to be used.MapperConfigurator(ObjectMapper mapper, Annotations[] defAnnotations)
-
Uses of ObjectMapper in org.codehaus.jackson.map
Methods in org.codehaus.jackson.map that return ObjectMapper Modifier and Type Method Description ObjectMapper
ObjectMapper. configure(JsonGenerator.Feature f, boolean state)
Method for changing state of an on/offJsonGenerator
feature forJsonFactory
instance this object mapper uses.ObjectMapper
ObjectMapper. configure(JsonParser.Feature f, boolean state)
Method for changing state of an on/offJsonParser
feature forJsonFactory
instance this object mapper uses.ObjectMapper
ObjectMapper. configure(DeserializationConfig.Feature f, boolean state)
Method for changing state of an on/off deserialization feature for this object mapper.ObjectMapper
ObjectMapper. configure(SerializationConfig.Feature f, boolean state)
Method for changing state of an on/off serialization feature for this object mapper.ObjectMapper
ObjectMapper. disable(DeserializationConfig.Feature... f)
Method for enabling specifiedDeserializationConfig
features.ObjectMapper
ObjectMapper. disable(SerializationConfig.Feature... f)
Method for enabling specifiedDeserializationConfig
features.ObjectMapper
ObjectMapper. disableDefaultTyping()
Method for disabling automatic inclusion of type information; if so, only explicitly annotated types (ones withJsonTypeInfo
) will have additional embedded type information.ObjectMapper
ObjectMapper. enable(DeserializationConfig.Feature... f)
Method for enabling specifiedDeserializationConfig
features.ObjectMapper
ObjectMapper. enable(SerializationConfig.Feature... f)
Method for enabling specifiedDeserializationConfig
features.ObjectMapper
ObjectMapper. enableDefaultTyping()
Convenience method that is equivalent to callingObjectMapper
ObjectMapper. enableDefaultTyping(ObjectMapper.DefaultTyping dti)
Convenience method that is equivalent to callingObjectMapper
ObjectMapper. enableDefaultTyping(ObjectMapper.DefaultTyping applicability, JsonTypeInfo.As includeAs)
Method for enabling automatic inclusion of type information, needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
).ObjectMapper
ObjectMapper. enableDefaultTypingAsProperty(ObjectMapper.DefaultTyping applicability, java.lang.String propertyName)
Method for enabling automatic inclusion of type information -- needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
) -- using "As.PROPERTY" inclusion mechanism and specified property name to use for inclusion (default being "@class" since default type information always uses class name as type identifier)ObjectMapper
MappingJsonFactory. getCodec()
We'll override the method to return more specific type; co-variance helps hereObjectMapper
ObjectMapper. setAnnotationIntrospector(AnnotationIntrospector ai)
Method for changingAnnotationIntrospector
used by this mapper instance for both serialization and deserializationObjectMapper
ObjectMapper. setDefaultTyping(TypeResolverBuilder<?> typer)
Method for enabling automatic inclusion of type information, using specified handler object for determining which types this affects, as well as details of how information is embedded.ObjectMapper
ObjectMapper. setDeserializationConfig(DeserializationConfig cfg)
Method for replacing the shared default deserialization configuration object.ObjectMapper
ObjectMapper. setDeserializerProvider(DeserializerProvider p)
Method for setting specificDeserializerProvider
to use for handling caching ofJsonDeserializer
instances.ObjectMapper
ObjectMapper. setInjectableValues(InjectableValues injectableValues)
ObjectMapper
ObjectMapper. setNodeFactory(JsonNodeFactory f)
Method for specifyingJsonNodeFactory
to use for constructing root level tree nodes (via methodcreateObjectNode()
ObjectMapper
ObjectMapper. setPropertyNamingStrategy(PropertyNamingStrategy s)
Method for setting custom property naming strategy to use.ObjectMapper
ObjectMapper. setSerializationConfig(SerializationConfig cfg)
Method for replacing the shared default serialization configuration object.ObjectMapper
ObjectMapper. setSerializationInclusion(JsonSerialize.Inclusion incl)
Method for setting defalt POJO property inclusion strategy for serialization.ObjectMapper
ObjectMapper. setSerializerFactory(SerializerFactory f)
Method for setting specificSerializerFactory
to use for constructing (bean) serializers.ObjectMapper
ObjectMapper. setSerializerProvider(SerializerProvider p)
Method for setting specificSerializerProvider
to use for handling caching ofJsonSerializer
instances.ObjectMapper
ObjectMapper. setTypeFactory(TypeFactory f)
Method that can be used to overrideTypeFactory
instance used by this mapper.ObjectMapper
ObjectMapper. setVisibility(JsonMethod forMethod, JsonAutoDetect.Visibility visibility)
Convenience method that allows changing configuration for underlyingVisibilityChecker
s, to change details of what kinds of properties are auto-detected.ObjectMapper
ObjectMapper. withModule(Module module)
Fluent-style alternative toregisterModule(org.codehaus.jackson.map.Module)
; functionally equivalent to:Constructors in org.codehaus.jackson.map with parameters of type ObjectMapper Constructor Description MappingJsonFactory(ObjectMapper mapper)
ObjectReader(ObjectMapper mapper, DeserializationConfig config)
Constructor used byObjectMapper
for initial instantiationObjectReader(ObjectMapper mapper, DeserializationConfig config, JavaType valueType, java.lang.Object valueToUpdate, FormatSchema schema, InjectableValues injectableValues)
ObjectWriter(ObjectMapper mapper, SerializationConfig config)
Alternative constructor for initial instantiation.ObjectWriter(ObjectMapper mapper, SerializationConfig config, FormatSchema s)
Alternative constructor for initial instantiation.ObjectWriter(ObjectMapper mapper, SerializationConfig config, JavaType rootType, PrettyPrinter pp)
Constructor used byObjectMapper
for initial instantiation
-