Package | Description |
---|---|
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 via
ObjectMapper class, as well
as convenience methods included in
JsonParser |
org.codehaus.jackson.map.ext |
Contains extended support for "external" packages: things that
may or may not be present in runtime environment, but that are
commonly enough used so that explicit support can be added.
|
org.codehaus.jackson.map.introspect |
Functionality needed for Bean introspection, required for detecting
accessors and mutators for Beans, as well as locating and handling
method annotations.
|
org.codehaus.jackson.map.jsontype |
Package that contains interfaces that define how to implement
functionality for dynamically resolving type during deserialization.
|
org.codehaus.jackson.map.jsontype.impl |
Package that contains standard implementations for
TypeResolverBuilder
and
TypeIdResolver . |
org.codehaus.jackson.map.module |
Package that contains classes and interfaces to help implement
custom extension
Module s
(which are registered using
ObjectMapper.registerModule(org.codehaus.jackson.map.Module) . |
org.codehaus.jackson.map.ser |
Contains implementation classes of serialization part of
data binding.
|
org.codehaus.jackson.map.ser.std |
Modifier and Type | Field and Description |
---|---|
protected SerializationConfig |
SerializerProvider._config
Serialization configuration to use for serialization processing.
|
protected SerializationConfig |
ObjectWriter._config
General serialization configuration settings
|
protected SerializationConfig |
ObjectMapper._serializationConfig
Configuration object that defines basic global
settings for the serialization process
|
Modifier and Type | Method and Description |
---|---|
SerializationConfig |
ObjectMapper.copySerializationConfig()
Method that creates a copy of
the shared default
SerializationConfig object
that defines configuration settings for serialization. |
SerializationConfig |
SerializationConfig.createUnshared(SubtypeResolver subtypeResolver) |
SerializationConfig |
SerializerProvider.getConfig()
Method for accessing configuration for the serialization processing.
|
SerializationConfig |
ObjectMapper.getSerializationConfig()
Method that returns the shared default
SerializationConfig
object that defines configuration settings for serialization. |
SerializationConfig |
Module.SetupContext.getSerializationConfig()
Method that returns current serialization configuration
settings.
|
SerializationConfig |
SerializationConfig.with(SerializationConfig.Feature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features enabled.
|
SerializationConfig |
SerializationConfig.withAnnotationIntrospector(AnnotationIntrospector ai) |
SerializationConfig |
SerializationConfig.withAppendedAnnotationIntrospector(AnnotationIntrospector ai) |
SerializationConfig |
SerializationConfig.withClassIntrospector(ClassIntrospector<? extends BeanDescription> ci) |
SerializationConfig |
SerializationConfig.withDateFormat(DateFormat df)
In addition to constructing instance with specified date format,
will enable or disable
Feature.WRITE_DATES_AS_TIMESTAMPS
(enable if format set as null; disable if non-null) |
SerializationConfig |
SerializationConfig.withFilters(FilterProvider filterProvider) |
SerializationConfig |
SerializationConfig.withHandlerInstantiator(HandlerInstantiator hi) |
SerializationConfig |
SerializationConfig.withInsertedAnnotationIntrospector(AnnotationIntrospector ai) |
SerializationConfig |
SerializationConfig.without(SerializationConfig.Feature... features)
Fluent factory method that will construct and return a new configuration
object instance with specified features disabled.
|
SerializationConfig |
SerializationConfig.withPropertyNamingStrategy(PropertyNamingStrategy pns) |
SerializationConfig |
SerializationConfig.withSerializationInclusion(JsonSerialize.Inclusion incl) |
SerializationConfig |
SerializationConfig.withSubtypeResolver(SubtypeResolver str) |
SerializationConfig |
SerializationConfig.withTypeFactory(TypeFactory tf) |
SerializationConfig |
SerializationConfig.withTypeResolverBuilder(TypeResolverBuilder<?> trb) |
SerializationConfig |
SerializationConfig.withView(Class<?> view) |
SerializationConfig |
SerializationConfig.withVisibility(JsonMethod forMethod,
JsonAutoDetect.Visibility visibility) |
SerializationConfig |
SerializationConfig.withVisibilityChecker(VisibilityChecker<?> vc) |
Modifier and Type | Method and Description |
---|---|
TypeSerializer |
ObjectMapper.DefaultTypeResolverBuilder.buildTypeSerializer(SerializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes,
BeanProperty property) |
JsonSerializer<T> |
ContextualSerializer.createContextual(SerializationConfig config,
BeanProperty property)
Method called to see if a different (or differently configured) serializer
is needed to serialize values of specified property.
|
abstract JsonSerializer<Object> |
SerializerFactory.createKeySerializer(SerializationConfig config,
JavaType baseType,
BeanProperty property)
Method called to create serializer to use for serializing JSON property names (which must
be output as
JsonToken.FIELD_NAME ) for Map that has specified declared
key type, and is for specified property (or, if property is null, as root value) |
JsonSerializer<Object> |
SerializerFactory.createSerializer(JavaType type,
SerializationConfig config)
Deprecated.
Since 1.7, call variant with more arguments
|
abstract JsonSerializer<Object> |
SerializerFactory.createSerializer(SerializationConfig config,
JavaType baseType,
BeanProperty property)
Method called to create (or, for immutable serializers, reuse) a serializer for given type.
|
TypeSerializer |
SerializerFactory.createTypeSerializer(JavaType baseType,
SerializationConfig config)
Deprecated.
Since 1.7, call variant with more arguments
|
abstract TypeSerializer |
SerializerFactory.createTypeSerializer(SerializationConfig config,
JavaType baseType,
BeanProperty property)
Method called to create a type information serializer for given base type,
if one is needed.
|
JsonSerializer<?> |
Serializers.findArraySerializer(SerializationConfig config,
ArrayType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified array type.
|
JsonSerializer<?> |
Serializers.Base.findArraySerializer(SerializationConfig config,
ArrayType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.findCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.Base.findCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.findCollectionSerializer(SerializationConfig config,
CollectionType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.Base.findCollectionSerializer(SerializationConfig config,
CollectionType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.findMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.Base.findMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.findMapSerializer(SerializationConfig config,
MapType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.Base.findMapSerializer(SerializationConfig config,
MapType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
Serializers.findSerializer(SerializationConfig config,
JavaType type,
BeanDescription beanDesc,
BeanProperty property)
Method called by serialization framework first time a serializer is needed for
specified type, which is not of a container type (for which other methods are
called).
|
JsonSerializer<?> |
Serializers.Base.findSerializer(SerializationConfig config,
JavaType type,
BeanDescription beanDesc,
BeanProperty property) |
abstract T |
ClassIntrospector.forSerialization(SerializationConfig cfg,
JavaType type,
ClassIntrospector.MixInResolver r)
Factory method that constructs an introspector that has all
information needed for serialization purposes.
|
JsonSchema |
ObjectMapper.generateJsonSchema(Class<?> t,
SerializationConfig cfg)
Generate Json-schema
instance for specified class, using specific
serialization configuration
|
abstract JsonSchema |
SerializerProvider.generateJsonSchema(Class<?> type,
SerializationConfig config,
SerializerFactory jsf)
Generate Json-schema for
given type.
|
abstract boolean |
SerializerProvider.hasSerializerFor(SerializationConfig cfg,
Class<?> cls,
SerializerFactory jsf)
Method that can be called to see if this serializer provider
can find a serializer for an instance of given class.
|
abstract JsonSerializer<?> |
HandlerInstantiator.serializerInstance(SerializationConfig config,
Annotated annotated,
Class<? extends JsonSerializer<?>> serClass)
Method called to get an instance of serializer of specified type.
|
abstract void |
SerializerProvider.serializeValue(SerializationConfig cfg,
JsonGenerator jgen,
Object value,
JavaType rootType,
SerializerFactory jsf)
The method to be called by
ObjectMapper to
execute recursive serialization, using serializers that
this provider has access to; and using specified root type
for locating first-level serializer. |
abstract void |
SerializerProvider.serializeValue(SerializationConfig cfg,
JsonGenerator jgen,
Object value,
SerializerFactory jsf)
The method to be called by
ObjectMapper to
execute recursive serialization, using serializers that
this provider has access to. |
ObjectMapper |
ObjectMapper.setSerializationConfig(SerializationConfig cfg)
Method for replacing the shared default serialization configuration
object.
|
void |
ObjectMapper.writeTree(JsonGenerator jgen,
JsonNode rootNode,
SerializationConfig cfg)
Method to serialize given Json Tree, using generator
provided.
|
void |
ObjectMapper.writeValue(JsonGenerator jgen,
Object value,
SerializationConfig config)
Method that can be used to serialize any Java value as
JSON output, using provided
JsonGenerator ,
configured as per passed configuration object. |
Modifier and Type | Method and Description |
---|---|
JsonSerializer<?> |
OptionalHandlerFactory.findSerializer(SerializationConfig config,
JavaType type) |
Modifier and Type | Method and Description |
---|---|
BasicBeanDescription |
BasicClassIntrospector.forSerialization(SerializationConfig cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
protected MethodFilter |
BasicClassIntrospector.getSerializationMethodFilter(SerializationConfig cfg)
Deprecated.
Since 1.9 just don't use
|
Modifier and Type | Method and Description |
---|---|
TypeSerializer |
TypeResolverBuilder.buildTypeSerializer(SerializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes,
BeanProperty property)
Method for building type serializer based on current configuration
of this builder.
|
Modifier and Type | Method and Description |
---|---|
TypeSerializer |
StdTypeResolverBuilder.buildTypeSerializer(SerializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes,
BeanProperty property) |
Modifier and Type | Field and Description |
---|---|
protected SerializationConfig |
PropertyBuilder._config |
Modifier and Type | Method and Description |
---|---|
protected BeanPropertyWriter |
BeanSerializerFactory._constructWriter(SerializationConfig config,
TypeBindings typeContext,
PropertyBuilder pb,
boolean staticTyping,
String name,
AnnotatedMember accessor)
Secondary helper method for constructing
BeanPropertyWriter for
given member (field or method). |
protected JsonSerializer<?> |
BasicSerializerFactory.buildArraySerializer(SerializationConfig config,
ArrayType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Object[] (and subtypes, except for String). |
protected JsonSerializer<?> |
BasicSerializerFactory.buildCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Collection and Collection-like types.
|
protected JsonSerializer<?> |
BasicSerializerFactory.buildCollectionSerializer(SerializationConfig config,
CollectionType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
List types that support efficient by-index access |
JsonSerializer<?> |
BasicSerializerFactory.buildContainerSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildEnumMapSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
EnumMap types. |
protected JsonSerializer<?> |
BasicSerializerFactory.buildEnumSetSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildIterableSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildIteratorSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
all "Map-like" types; both ones that implement
Map and
ones that do not (but that have been indicated to behave like Maps). |
protected JsonSerializer<?> |
BasicSerializerFactory.buildMapSerializer(SerializationConfig config,
MapType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Map types. |
List<BeanPropertyWriter> |
BeanSerializerModifier.changeProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> beanProperties)
Method called by
BeanSerializerFactory with tentative set
of discovered properties. |
protected JsonSerializer<Object> |
BeanSerializerFactory.constructBeanSerializer(SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property)
Method called to construct serializer for serializing specified bean type.
|
protected PropertyBuilder |
BeanSerializerFactory.constructPropertyBuilder(SerializationConfig config,
BasicBeanDescription beanDesc) |
protected StdSerializerProvider |
StdSerializerProvider.createInstance(SerializationConfig config,
SerializerFactory jsf)
Overridable method, used to create a non-blueprint instances from the blueprint.
|
JsonSerializer<Object> |
BeanSerializerFactory.createKeySerializer(SerializationConfig config,
JavaType type,
BeanProperty property) |
JsonSerializer<Object> |
CustomSerializerFactory.createSerializer(SerializationConfig config,
JavaType type,
BeanProperty property) |
JsonSerializer<Object> |
BeanSerializerFactory.createSerializer(SerializationConfig config,
JavaType origType,
BeanProperty property)
Main serializer constructor method.
|
abstract JsonSerializer<Object> |
BasicSerializerFactory.createSerializer(SerializationConfig config,
JavaType type,
BeanProperty property) |
TypeSerializer |
BasicSerializerFactory.createTypeSerializer(SerializationConfig config,
JavaType baseType,
BeanProperty property)
Method called to construct a type serializer for values with given declared
base type.
|
protected List<BeanPropertyWriter> |
BeanSerializerFactory.filterBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> props)
Overridable method that can filter out properties.
|
protected List<BeanPropertyWriter> |
BeanSerializerFactory.findBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc)
Method used to collect all actual serializable properties.
|
JsonSerializer<Object> |
BeanSerializerFactory.findBeanSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property)
Method that will try to construct a
BeanSerializer for
given class. |
protected static JsonSerializer<Object> |
BasicSerializerFactory.findContentSerializer(SerializationConfig config,
Annotated a,
BeanProperty property) |
protected JsonSerializer<?> |
CustomSerializerFactory.findCustomSerializer(Class<?> type,
SerializationConfig config) |
protected Object |
BeanSerializerFactory.findFilterId(SerializationConfig config,
BasicBeanDescription beanDesc)
Method called to find filter that is configured to be used with bean
serializer being built, if any.
|
protected static JsonSerializer<Object> |
BasicSerializerFactory.findKeySerializer(SerializationConfig config,
Annotated a,
BeanProperty property) |
TypeSerializer |
BeanSerializerFactory.findPropertyContentTypeSerializer(JavaType containerType,
SerializationConfig config,
AnnotatedMember accessor,
BeanProperty property)
Method called to create a type information serializer for values of given
container property
if one is needed.
|
TypeSerializer |
BeanSerializerFactory.findPropertyTypeSerializer(JavaType baseType,
SerializationConfig config,
AnnotatedMember accessor,
BeanProperty property)
Method called to create a type information serializer for values of given
non-container property
if one is needed.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByAddonType(SerializationConfig config,
JavaType javaType,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Reflection-based serialized find method, which checks if
given class implements one of recognized "add-on" interfaces.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByLookup(JavaType type,
SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Method that will use fast lookup (and identity comparison) methods to
see if we know serializer to use for given type.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByPrimaryType(JavaType type,
SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Method for checking if we can determine serializer to use based on set of
known primary types, checking for set of known base types (exact matches
having been compared against with
findSerializerByLookup ). |
protected JsonSerializer<Object> |
BasicSerializerFactory.findSerializerFromAnnotation(SerializationConfig config,
Annotated a,
BeanProperty property)
Helper method called to check if a class or method
has an annotation
(@link org.codehaus.jackson.map.ser.JsonSerialize#using)
that tells the class to use for serialization.
|
JsonSchema |
StdSerializerProvider.generateJsonSchema(Class<?> type,
SerializationConfig config,
SerializerFactory jsf) |
boolean |
StdSerializerProvider.hasSerializerFor(SerializationConfig config,
Class<?> cls,
SerializerFactory jsf) |
protected static <T extends JavaType> |
BasicSerializerFactory.modifySecondaryTypesByAnnotation(SerializationConfig config,
Annotated a,
T type) |
JsonSerializer<?> |
BeanSerializerModifier.modifySerializer(SerializationConfig config,
BasicBeanDescription beanDesc,
JsonSerializer<?> serializer)
Method called by
BeanSerializerFactory after constructing default
bean serializer instance with properties collected and ordered earlier. |
protected <T extends JavaType> |
BasicSerializerFactory.modifyTypeByAnnotation(SerializationConfig config,
Annotated a,
T type)
Helper method used to encapsulate details of annotation-based type
coercion
|
List<BeanPropertyWriter> |
BeanSerializerModifier.orderProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> beanProperties)
Method called by
BeanSerializerFactory with set of properties
to serialize, in default ordering (based on defaults as well as
possible type annotations). |
protected void |
BeanSerializerFactory.processViews(SerializationConfig config,
BeanSerializerBuilder builder)
Method called to handle view information for constructed serializer,
based on bean property writers.
|
protected void |
BeanSerializerFactory.removeIgnorableTypes(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyDefinition> properties)
Method that will apply by-type limitations (as per [JACKSON-429]);
by default this is based on
JsonIgnoreType annotation but
can be supplied by module-provided introspectors too. |
protected void |
BeanSerializerFactory.removeSetterlessGetters(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyDefinition> properties)
Helper method that will remove all properties that do not have a
mutator.
|
void |
StdSerializerProvider.serializeValue(SerializationConfig config,
JsonGenerator jgen,
Object value,
JavaType rootType,
SerializerFactory jsf) |
void |
StdSerializerProvider.serializeValue(SerializationConfig config,
JsonGenerator jgen,
Object value,
SerializerFactory jsf) |
protected List<BeanPropertyWriter> |
BeanSerializerFactory.sortBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> props)
Deprecated.
Since 1.9 this method does nothing, so there is no
benefit from overriding it; it will be removed from 2.0.
|
BeanSerializerBuilder |
BeanSerializerModifier.updateBuilder(SerializationConfig config,
BasicBeanDescription beanDesc,
BeanSerializerBuilder builder)
Method called by
BeanSerializerFactory after collecting all information
regarding POJO to serialize and updating builder with it, but before constructing
serializer. |
protected boolean |
BasicSerializerFactory.usesStaticTyping(SerializationConfig config,
BasicBeanDescription beanDesc,
TypeSerializer typeSer,
BeanProperty property)
Helper method to check whether global settings and/or class
annotations for the bean class indicate that static typing
(declared types) should be used for properties.
|
Constructor and Description |
---|
PropertyBuilder(SerializationConfig config,
BasicBeanDescription beanDesc) |
StdSerializerProvider(SerializationConfig config,
StdSerializerProvider src,
SerializerFactory f)
"Copy-constructor", used from
StdSerializerProvider.createInstance(org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.map.SerializerFactory) (or by
sub-classes) |
Modifier and Type | Method and Description |
---|---|
static EnumSerializer |
EnumSerializer.construct(Class<Enum<?>> enumClass,
SerializationConfig config,
BasicBeanDescription beanDesc) |