Class JsonValueSerializer.TypeSerializerRerouter
java.lang.Object
tools.jackson.databind.jsontype.TypeSerializer
tools.jackson.databind.ser.jackson.JsonValueSerializer.TypeSerializerRerouter
- Enclosing class:
JsonValueSerializer
Silly little wrapper class we need to re-route type serialization so that we can
override Object to use for type id (logical type) even when asking serialization
of something else (delegate type)
-
Field Summary
Fields -
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.Name of property that contains type information, if property-based inclusion is used.Accessor for object that handles conversions between types and matching type ids.com.fasterxml.jackson.annotation.JsonTypeInfo.AsAccessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON.tools.jackson.core.type.WritableTypeIdwriteTypePrefix(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, tools.jackson.core.type.WritableTypeId typeId) Method called to write initial part of type information for given value, along with possible wrapping to use: details are specified by `typeId` argument.tools.jackson.core.type.WritableTypeIdwriteTypeSuffix(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, tools.jackson.core.type.WritableTypeId typeId) 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 TypeSerializer
typeId, typeId, typeId
-
Field Details
-
_typeSerializer
-
_forObject
-
-
Constructor Details
-
TypeSerializerRerouter
-
-
Method Details
-
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
public com.fasterxml.jackson.annotation.JsonTypeInfo.As 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 classTypeSerializer
-
getPropertyName
Description copied from class:TypeSerializerName of property that contains type information, if property-based inclusion is used.- Specified by:
getPropertyNamein classTypeSerializer
-
getTypeIdResolver
Description copied from class:TypeSerializerAccessor for object that handles conversions between types and matching type ids.- Specified by:
getTypeIdResolverin classTypeSerializer
-
writeTypePrefix
public tools.jackson.core.type.WritableTypeId writeTypePrefix(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, tools.jackson.core.type.WritableTypeId typeId) throws tools.jackson.core.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.- Specified by:
writeTypePrefixin classTypeSerializer- Parameters:
g- Generator to use for outputting type id and possible wrappingtypeId- Details of what type id is to be written, how.- Throws:
tools.jackson.core.JacksonException
-
writeTypeSuffix
public tools.jackson.core.type.WritableTypeId writeTypeSuffix(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, tools.jackson.core.type.WritableTypeId typeId) throws tools.jackson.core.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(...).- Specified by:
writeTypeSuffixin classTypeSerializer- Parameters:
g- Generator to use for outputting type id and possible wrappingtypeId- Details of what type id is to be written, how.- Throws:
tools.jackson.core.JacksonException
-