Uses of Class
org.codehaus.jackson.map.ObjectMapper
Packages that use ObjectMapper
Package
Description
Jackson-based JAX-RS provider that can automatically
serialize and deserialize resources for
JSON content type (MediaType).
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 via
ObjectMapper
class, as well
as convenience methods included in
JsonParser
-
Uses of ObjectMapper in org.codehaus.jackson.jaxrs
Fields in org.codehaus.jackson.jaxrs declared as ObjectMapperModifier and TypeFieldDescriptionprotected 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 ObjectMapperModifier and TypeMethodDescriptionMapperConfigurator.getConfiguredMapper()
Method that locates, configures and returnsObjectMapper
to useMapperConfigurator.getDefaultMapper()
JacksonJsonProvider.locateMapper
(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 ObjectMapperModifier and TypeMethodDescriptionprotected Class<?>
JacksonJsonProvider._findView
(ObjectMapper mapper, 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 ObjectMapperModifierConstructorDescriptionJacksonJaxbJsonProvider
(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 ObjectMapperModifier and TypeMethodDescriptionObjectMapper.configure
(JsonGenerator.Feature f, boolean state) Method for changing state of an on/offJsonGenerator
feature forJsonFactory
instance this object mapper uses.ObjectMapper.configure
(JsonParser.Feature f, boolean state) Method for changing state of an on/offJsonParser
feature forJsonFactory
instance this object mapper uses.ObjectMapper.configure
(DeserializationConfig.Feature f, boolean state) Method for changing state of an on/off deserialization feature for this object mapper.ObjectMapper.configure
(SerializationConfig.Feature f, boolean state) Method for changing state of an on/off serialization feature for this object mapper.ObjectMapper.disable
(DeserializationConfig.Feature... f) Method for enabling specifiedDeserializationConfig
features.ObjectMapper.disable
(SerializationConfig.Feature... f) Method for enabling specifiedDeserializationConfig
features.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.enable
(DeserializationConfig.Feature... f) Method for enabling specifiedDeserializationConfig
features.ObjectMapper.enable
(SerializationConfig.Feature... f) Method for enabling specifiedDeserializationConfig
features.ObjectMapper.enableDefaultTyping()
Convenience method that is equivalent to callingObjectMapper.enableDefaultTyping
(ObjectMapper.DefaultTyping dti) Convenience method that is equivalent to callingObjectMapper.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.enableDefaultTypingAsProperty
(ObjectMapper.DefaultTyping applicability, 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)final ObjectMapper
MappingJsonFactory.getCodec()
We'll override the method to return more specific type; co-variance helps hereObjectMapper.setAnnotationIntrospector
(AnnotationIntrospector ai) Method for changingAnnotationIntrospector
used by this mapper instance for both serialization and deserializationObjectMapper.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.setDeserializationConfig
(DeserializationConfig cfg) Method for replacing the shared default deserialization configuration object.ObjectMapper.setDeserializerProvider
(DeserializerProvider p) Method for setting specificDeserializerProvider
to use for handling caching ofJsonDeserializer
instances.ObjectMapper.setInjectableValues
(InjectableValues injectableValues) ObjectMapper.setNodeFactory
(JsonNodeFactory f) Method for specifyingJsonNodeFactory
to use for constructing root level tree nodes (via methodcreateObjectNode()
ObjectMapper.setPropertyNamingStrategy
(PropertyNamingStrategy s) Method for setting custom property naming strategy to use.ObjectMapper.setSerializationConfig
(SerializationConfig cfg) Method for replacing the shared default serialization configuration object.ObjectMapper.setSerializationInclusion
(JsonSerialize.Inclusion incl) Method for setting defalt POJO property inclusion strategy for serialization.ObjectMapper.setSerializerFactory
(SerializerFactory f) Method for setting specificSerializerFactory
to use for constructing (bean) serializers.ObjectMapper.setSerializerProvider
(SerializerProvider p) Method for setting specificSerializerProvider
to use for handling caching ofJsonSerializer
instances.ObjectMapper.setTypeFactory
(TypeFactory f) Method that can be used to overrideTypeFactory
instance used by this mapper.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.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 ObjectMapperModifierConstructorDescriptionMappingJsonFactory
(ObjectMapper mapper) protected
ObjectReader
(ObjectMapper mapper, DeserializationConfig config) Constructor used byObjectMapper
for initial instantiationprotected
ObjectReader
(ObjectMapper mapper, DeserializationConfig config, JavaType valueType, Object valueToUpdate, FormatSchema schema, InjectableValues injectableValues) protected
ObjectWriter
(ObjectMapper mapper, SerializationConfig config) Alternative constructor for initial instantiation.protected
ObjectWriter
(ObjectMapper mapper, SerializationConfig config, FormatSchema s) Alternative constructor for initial instantiation.protected
ObjectWriter
(ObjectMapper mapper, SerializationConfig config, JavaType rootType, PrettyPrinter pp) Constructor used byObjectMapper
for initial instantiation