Class TypeSerializer

  • Direct Known Subclasses:
    TypeSerializerBase

    public abstract class TypeSerializer
    extends java.lang.Object
    Interface for serializing type information regarding instances of specified base type (super class), so that exact subtype can be properly deserialized later on. These instances are to be called by regular JsonSerializers using proper contextual calls, to add type information using mechanism type serializer was configured with.

    NOTE: version 2.9 contains significant attempt at simplifying interface, as well as giving format implementation (via JsonGenerator) more control over actual serialization details. Minor changes are required to change call pattern so that return value of "prefix" write needs to be passed to "suffix" write.