public interface Serializers
JsonSerializer
for specified type, or null to indicate that it
does not support handling of the type. In latter case, further calls can be made
for other providers; in former case returned serializer is used for handling of
instances of specified type.Modifier and Type | Interface and Description |
---|---|
static class |
Serializers.Base
Basic
Serializers implementation that implements all methods but provides
no serializers. |
static class |
Serializers.None
Deprecated.
As of 1.9, use
Serializers.Base instead |
Modifier and Type | Method and Description |
---|---|
JsonSerializer<?> |
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<?> |
findCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
findCollectionSerializer(SerializationConfig config,
CollectionType type,
BeanDescription beanDesc,
BeanProperty property,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
findMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
findMapSerializer(SerializationConfig config,
MapType type,
BeanDescription beanDesc,
BeanProperty property,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
JsonSerializer<?> |
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<?> findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc, BeanProperty property)
Note: in version 1.7, this method was called to find serializers for all type, including container types.
type
- Fully resolved type of instances to serializeconfig
- Serialization configuration in usebeanDesc
- Additional information about type; will always be of type
BasicBeanDescription
(that is,
safe to cast to this more specific type)property
- Property that contains values to serializeJsonSerializer<?> findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription beanDesc, BeanProperty property, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
JsonSerializer<?> findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, BeanProperty property, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
JsonSerializer<?> findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, BeanProperty property, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, BeanProperty property, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
JsonSerializer<?> findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, BeanProperty property, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)