Class JsonValueSerializer

All Implemented Interfaces:
JsonFormatVisitable, SchemaAware, ContextualSerializer, Serializable

public class JsonValueSerializer extends StdSerializer<Object> implements ContextualSerializer, JsonFormatVisitable
Serializer class that can serialize Object that have a JsonValue annotation to indicate that serialization should be done by calling the method annotated, and serializing result it returns.

Implementation note: we will post-process resulting serializer (much like what is done with BeanSerializer) to figure out actual serializers for final types. This must be done from createContextual(com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.BeanProperty) method, and NOT from constructor; otherwise we could end up with an infinite loop.

See Also: