org.codehaus.jackson.map
Interface Serializers

All Known Implementing Classes:
SimpleSerializers

public interface Serializers

Interface that defines API for simple extensions that can provide additional serializers for various types. Access is by a single callback method; instance is to either return a configured 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.

Since:
1.7

Method Summary
 JsonSerializer<?> findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc, BeanProperty property)
          Method called serialization framework first time a serializer is needed for specified type.
 

Method Detail

findSerializer

JsonSerializer<?> findSerializer(SerializationConfig config,
                                 JavaType type,
                                 BeanDescription beanDesc,
                                 BeanProperty property)
Method called serialization framework first time a serializer is needed for specified type. Implementation should return a serializer instance if it supports specified type; or null if it does not.

Parameters:
type - Fully resolved type of instances to serialize
config - Serialization configuration in use
beanDesc - 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 serialize
Returns:
Configured serializer to use for the type; or null if implementation does not recognize or support type