Serializers which allows registration of
serializers based on raw (type erased class).
It can work well for basic bean and scalar type serializers, but is not
a good fit for handling generic types (like Maps and Collections).
Type registrations are assumed to be general; meaning that registration of serializer
for a super type will also be used for handling subtypes, unless an exact match
is found first. As an example, handler for CharSequence would also be used
serializing StringBuilder instances, unless a direct mapping was found.
| Modifier and Type | Field and Description |
|---|---|
| protected HashMap | _classMappings
Class-based mappings that are used both for exact and sub-class matches. |
| protected boolean | _hasEnumSerializer
Flag to help find "generic" enum serializer, if one has been registered. |
| protected HashMap | _interfaceMappings
Interface-based matches. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected JsonSerializer | |
| public void | addSerializer(JsonSerializer<?> ser)
Method for adding given serializer for type that |
| public <T> void | |
| public void | |
| public JsonSerializer | findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Overrides com. Implements com. |
| public JsonSerializer | findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Overrides com. Implements com. java.,
but does not implement it).
|
| public JsonSerializer | findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Overrides com. Implements com. java. type.
|
| public JsonSerializer | findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Overrides com. Implements com. java.,
but does not implement it).
|
| public JsonSerializer | findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Overrides com. Implements com. java. type.
|
| public JsonSerializer | findSerializer(SerializationConfig
Serialization configuration in use config, JavaType Fully resolved type of instances to serialize type, BeanDescription Additional information about type beanDesc)Overrides com. Implements com. |
| _classMappings | back to summary |
|---|---|
| protected HashMap<ClassKey, JsonSerializer<?>> _classMappings Class-based mappings that are used both for exact and sub-class matches. | |
| _hasEnumSerializer | back to summary |
|---|---|
| protected boolean _hasEnumSerializer Flag to help find "generic" enum serializer, if one has been registered.
| |
| _interfaceMappings | back to summary |
|---|---|
| protected HashMap<ClassKey, JsonSerializer<?>> _interfaceMappings Interface-based matches. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SimpleSerializers | back to summary |
|---|---|
| public SimpleSerializers() | |
| SimpleSerializers | back to summary |
|---|---|
public SimpleSerializers(List<JsonSerializer<?>> sers)
| |
| _addSerializer | back to summary |
|---|---|
| protected void _addSerializer(Class<?> cls, JsonSerializer<?> ser) | |
| _findInterfaceMapping | back to summary |
|---|---|
| protected JsonSerializer | |
| addSerializer | back to summary |
|---|---|
| public void addSerializer(JsonSerializer<?> ser) Method for adding given serializer for type that | |
| addSerializer | back to summary |
|---|---|
| public <T> void addSerializer(Class<? extends T> type, JsonSerializer<T> ser) | |
| addSerializers | back to summary |
|---|---|
public void addSerializers(List<JsonSerializer<?>> sers)
| |
| findArraySerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for specified array type. Implementation should return a serializer instance if it supports specified type; or null if it does not.
| |
| findCollectionLikeSerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for
specified "Collection-like" type (type that acts like
| |
| findCollectionSerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for
specified
| |
| findMapLikeSerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for
specified "Map-like" type (type that acts like
| |
| findMapSerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for
specified
| |
| findSerializer | back to summary |
|---|---|
| public JsonSerializer Overrides com. Implements com. Doc from com. Method called by serialization framework first time a serializer is needed for specified type, which is not of a container or reference type (for which other methods are called).
| |