Module tools.jackson.databind
Class AsDeductionTypeSerializer
java.lang.Object
tools.jackson.databind.jsontype.TypeSerializer
tools.jackson.databind.jsontype.impl.TypeSerializerBase
tools.jackson.databind.jsontype.impl.AsDeductionTypeSerializer
-
Field Summary
Fields inherited from class tools.jackson.databind.jsontype.impl.TypeSerializerBase
_idResolver, _property -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforProperty(SerializationContext ctxt, BeanProperty prop) Method called to create contextual version, to be used for values of given property.Accessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON.static AsDeductionTypeSerializerinstance()writeTypePrefix(JsonGenerator g, SerializationContext ctxt, WritableTypeId idMetadata) Method called to write initial part of type information for given value, along with possible wrapping to use: details are specified by `typeId` argument.writeTypeSuffix(JsonGenerator g, SerializationContext ctxt, WritableTypeId idMetadata) Method called to write the "closing" part of type information for given value, along with possible closing wrapping to use: details are specified by `typeId` argument, which should be one returned from an earlier matching call towriteTypePrefix(...).Methods inherited from class tools.jackson.databind.jsontype.impl.TypeSerializerBase
_generateTypeId, getPropertyName, getTypeIdResolver, handleMissingId, idFromValue, idFromValueAndTypeMethods inherited from class tools.jackson.databind.jsontype.TypeSerializer
typeId, typeId, typeId
-
Constructor Details
-
AsDeductionTypeSerializer
protected AsDeductionTypeSerializer()
-
-
Method Details
-
instance
-
forProperty
Description copied from class:TypeSerializerMethod 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 (forCollectionorMapvalued properties).NOTE: since 3.0 has received context object as first argument.
- Specified by:
forPropertyin classTypeSerializer
-
getTypeInclusion
Description copied from class:TypeSerializerAccessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON.- Specified by:
getTypeInclusionin classTypeSerializerBase
-
writeTypePrefix
public WritableTypeId writeTypePrefix(JsonGenerator g, SerializationContext ctxt, WritableTypeId idMetadata) throws JacksonException Description copied from class:TypeSerializerMethod called to write initial part of type information for given value, along with possible wrapping to use: details are specified by `typeId` argument. Note that for structured types (Object, Array), this call will add necessary start token so it should NOT be explicitly written, unlike with non-type-id value writes.- Overrides:
writeTypePrefixin classTypeSerializerBase- Parameters:
g- Generator to use for outputting type id and possible wrappingidMetadata- Details of what type id is to be written, how.- Throws:
JacksonException
-
writeTypeSuffix
public WritableTypeId writeTypeSuffix(JsonGenerator g, SerializationContext ctxt, WritableTypeId idMetadata) throws JacksonException Description copied from class:TypeSerializerMethod called to write the "closing" part of type information for given value, along with possible closing wrapping to use: details are specified by `typeId` argument, which should be one returned from an earlier matching call towriteTypePrefix(...).- Overrides:
writeTypeSuffixin classTypeSerializerBase- Parameters:
g- Generator to use for outputting type id and possible wrappingidMetadata- Details of what type id is to be written, how.- Throws:
JacksonException
-