Class AsExistingPropertyTypeSerializer


public class AsExistingPropertyTypeSerializer extends TypeSerializerBase
Type serializer used with JsonTypeInfo.As.EXISTING_PROPERTY inclusion mechanism. Expects type information to be a well-defined property on all sub-classes. Inclusion of type information otherwise follows behavior of JsonTypeInfo.As.PROPERTY.
  • Field Details

    • _typePropertyName

      protected final String _typePropertyName
  • Constructor Details

  • Method Details

    • forProperty

      Description copied from class: TypeSerializer
      Method called to create contextual version, to be used for values of given property. This may be the type itself (as is the case for bean properties), or values contained (for Collection or Map valued properties).

      NOTE: since 3.0 has received context object as first argument.

      Specified by:
      forProperty in class TypeSerializer
    • getTypeInclusion

      public com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
      Description copied from class: TypeSerializer
      Accessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON.
      Specified by:
      getTypeInclusion in class TypeSerializerBase