Uses of Class
com.fasterxml.jackson.databind.jsontype.TypeSerializer
Packages that use TypeSerializer
Package
Description
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode
), as well as
writing Java Objects and trees as JSON.Contains extended support for "external" packages: things that
may or may not be present in runtime environment, but that are
commonly enough used so that explicit support can be added.
Package that contains interfaces that define how to implement
functionality for dynamically resolving type during deserialization.
Package that contains standard implementations for
TypeResolverBuilder
and
TypeIdResolver
.Package that contains classes and interfaces to help implement
custom extension
Module
s
(which are registered using
ObjectMapper.registerModule(com.fasterxml.jackson.databind.Module)
.Contains concrete
JsonNode
implementations
Jackson uses for the Tree model.Contains implementation classes of serialization part of
data binding.
Contains implementation classes of serialization part of
data binding.
Utility classes for Mapper package.
-
Uses of TypeSerializer in com.fasterxml.jackson.databind
Fields in com.fasterxml.jackson.databind declared as TypeSerializerMethods in com.fasterxml.jackson.databind that return TypeSerializerModifier and TypeMethodDescriptionObjectMapper.DefaultTypeResolverBuilder.buildTypeSerializer
(SerializationConfig config, JavaType baseType, Collection<NamedType> subtypes) SerializerProvider.findTypeSerializer
(JavaType javaType) Method called to get theTypeSerializer
to use for including Type Id necessary for serializing for the given Java class.final TypeSerializer
ObjectWriter.Prefetch.getTypeSerializer()
Methods in com.fasterxml.jackson.databind with parameters of type TypeSerializerModifier and TypeMethodDescriptionvoid
JsonSerializable.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) Serialization method called when additional type information is expected to be included in serialization, for deserialization to use.void
JsonSerializer.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information. -
Uses of TypeSerializer in com.fasterxml.jackson.databind.ext
Methods in com.fasterxml.jackson.databind.ext with parameters of type TypeSerializerModifier and TypeMethodDescriptionvoid
CoreXMLSerializers.XMLGregorianCalendarSerializer.serializeWithType
(XMLGregorianCalendar value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
NioPathSerializer.serializeWithType
(Path value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
SqlBlobSerializer.serializeWithType
(Blob value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.jsontype
Methods in com.fasterxml.jackson.databind.jsontype that return TypeSerializerModifier and TypeMethodDescriptionTypeResolverBuilder.buildTypeSerializer
(SerializationConfig config, JavaType baseType, Collection<NamedType> subtypes) Method for building type serializer based on current configuration of this builder.abstract TypeSerializer
TypeSerializer.forProperty
(BeanProperty prop) Method called to create contextual version, to be used for values of given property. -
Uses of TypeSerializer in com.fasterxml.jackson.databind.jsontype.impl
Subclasses of TypeSerializer in com.fasterxml.jackson.databind.jsontype.implModifier and TypeClassDescriptionclass
Type serializer that will embed type information in an array, as the first element, and actual value as the second element.class
class
Type serializer used withJsonTypeInfo.As.EXISTING_PROPERTY
inclusion mechanism.class
Type serializer that preferably embeds type information as an "external" type property; embedded in enclosing JSON object.class
Type serializer that preferably embeds type information as an additional JSON Object property, if possible (when resulting serialization would use JSON Object).class
Type wrapper that tries to use an extra JSON Object, with a single entry that has type name as key, to serialize type information.class
Methods in com.fasterxml.jackson.databind.jsontype.impl that return TypeSerializerModifier and TypeMethodDescriptionStdTypeResolverBuilder.buildTypeSerializer
(SerializationConfig config, JavaType baseType, Collection<NamedType> subtypes) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.module
Methods in com.fasterxml.jackson.databind.module with parameters of type TypeSerializerModifier and TypeMethodDescriptionSimpleSerializers.findArraySerializer
(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) SimpleSerializers.findCollectionLikeSerializer
(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) SimpleSerializers.findCollectionSerializer
(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) SimpleSerializers.findMapLikeSerializer
(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) SimpleSerializers.findMapSerializer
(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.node
Methods in com.fasterxml.jackson.databind.node with parameters of type TypeSerializerModifier and TypeMethodDescriptionvoid
ArrayNode.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) abstract void
BaseJsonNode.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider ctxt, TypeSerializer typeSer) Type information is needed, even if JsonNode instances are "plain" JSON, since they may be mixed with other types.void
MissingNode.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
ObjectNode.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
ValueNode.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.ser
Fields in com.fasterxml.jackson.databind.ser declared as TypeSerializerModifier and TypeFieldDescriptionprotected TypeSerializer
BeanPropertyWriter._typeSerializer
If property being serialized needs type information to be included this is the type serializer to use.Methods in com.fasterxml.jackson.databind.ser that return TypeSerializerModifier and TypeMethodDescriptionBasicSerializerFactory.createTypeSerializer
(SerializationConfig config, JavaType baseType) Method called to construct a type serializer for values with given declared base type.abstract TypeSerializer
SerializerFactory.createTypeSerializer
(SerializationConfig config, JavaType baseType) Method called to create a type information serializer for given base type, if one is needed.BeanSerializerFactory.findPropertyContentTypeSerializer
(JavaType containerType, SerializationConfig config, AnnotatedMember accessor) Method called to create a type information serializer for values of given container property if one is needed.BeanSerializerFactory.findPropertyTypeSerializer
(JavaType baseType, SerializationConfig config, AnnotatedMember accessor) Method called to create a type information serializer for values of given non-container property if one is needed.BeanPropertyWriter.getTypeSerializer()
Methods in com.fasterxml.jackson.databind.ser with parameters of type TypeSerializerModifier and TypeMethodDescriptionprotected BeanPropertyWriter
PropertyBuilder._constructPropertyWriter
(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue, Class<?>[] includeInViews) Overridable factory method for actual construction ofBeanPropertyWriter
; often needed if subclassingPropertyBuilder.buildWriter(com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition, com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.JsonSerializer<?>, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.introspect.AnnotatedMember, boolean)
method.protected abstract ContainerSerializer
<?> ContainerSerializer._withValueTypeSerializer
(TypeSerializer vts) Method that needs to be implemented to allow construction of a new serializer object with givenTypeSerializer
, used when addition type information is to be embedded.void
BeanPropertyWriter.assignTypeSerializer
(TypeSerializer typeSer) Method called to set, reset or clear the configured type serializer for property.protected JsonSerializer
<?> BasicSerializerFactory.buildArraySerializer
(SerializerProvider prov, ArrayType type, BeanDescription beanDesc, boolean staticTyping, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Helper method that handles configuration details when constructing serializers forObject[]
(and subtypes, except for String).protected JsonSerializer
<?> BasicSerializerFactory.buildAtomicReferenceSerializer
(SerializerProvider prov, ReferenceType refType, BeanDescription beanDesc, boolean staticTyping, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentSerializer) BasicSerializerFactory.buildCollectionSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer) protected JsonSerializer
<?> BasicSerializerFactory.buildCollectionSerializer
(SerializerProvider prov, CollectionType type, BeanDescription beanDesc, boolean staticTyping, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Helper method that handles configuration details when constructing serializers forList
types that support efficient by-index accessBasicSerializerFactory.buildIndexedListSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer) protected JsonSerializer
<?> BasicSerializerFactory.buildMapSerializer
(SerializerProvider prov, MapType type, BeanDescription beanDesc, boolean staticTyping, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Helper method that handles configuration details when constructing serializers forMap
types.protected BeanPropertyWriter
PropertyBuilder.buildWriter
(SerializerProvider prov, BeanPropertyDefinition propDef, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, TypeSerializer contentTypeSer, AnnotatedMember am, boolean defaultUseStaticTyping) Serializers.Base.findArraySerializer
(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Serializers.findArraySerializer
(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specified array type.Serializers.Base.findCollectionLikeSerializer
(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Serializers.findCollectionLikeSerializer
(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specified "Collection-like" type (type that acts likeCollection
, but does not implement it).Serializers.Base.findCollectionSerializer
(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Serializers.findCollectionSerializer
(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specifiedCollection
type.Serializers.Base.findMapLikeSerializer
(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Serializers.findMapLikeSerializer
(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specified "Map-like" type (type that acts likeMap
, but does not implement it).Serializers.Base.findMapSerializer
(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Serializers.findMapSerializer
(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specifiedMap
type.Serializers.Base.findReferenceSerializer
(SerializationConfig config, ReferenceType type, BeanDescription beanDesc, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentValueSerializer) Serializers.findReferenceSerializer
(SerializationConfig config, ReferenceType type, BeanDescription beanDesc, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentValueSerializer) Method called by serialization framework first time a serializer is needed for givenReferenceType
void
DefaultSerializerProvider.serializePolymorphic
(com.fasterxml.jackson.core.JsonGenerator gen, Object value, JavaType rootType, JsonSerializer<Object> valueSer, TypeSerializer typeSer) Alternate serialization call used for polymorphic types, whenTypeSerializer
is already known, but the actual serializer may or may not be.ContainerSerializer.withValueTypeSerializer
(TypeSerializer vts) Factory(-like) method that can be used to construct a new container serializer that uses specifiedTypeSerializer
for decorating contained values with additional type information.Constructors in com.fasterxml.jackson.databind.ser with parameters of type TypeSerializerModifierConstructorDescriptionBeanPropertyWriter
(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue) Deprecated.BeanPropertyWriter
(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue, Class<?>[] includeInViews) protected
VirtualBeanPropertyWriter
(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, com.fasterxml.jackson.annotation.JsonInclude.Value inclusion) Deprecated.protected
VirtualBeanPropertyWriter
(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, com.fasterxml.jackson.annotation.JsonInclude.Value inclusion, Class<?>[] includeInViews) Pass-through constructor that may be used by sub-classes that want full control over implementation. -
Uses of TypeSerializer in com.fasterxml.jackson.databind.ser.impl
Fields in com.fasterxml.jackson.databind.ser.impl declared as TypeSerializerModifier and TypeFieldDescriptionprotected final TypeSerializer
TypeWrappedSerializer._typeSerializer
protected final TypeSerializer
MapEntrySerializer._valueTypeSerializer
Type identifier serializer used for values, if any.Methods in com.fasterxml.jackson.databind.ser.impl that return TypeSerializerMethods in com.fasterxml.jackson.databind.ser.impl with parameters of type TypeSerializerModifier and TypeMethodDescriptionIndexedListSerializer._withValueTypeSerializer
(TypeSerializer vts) IteratorSerializer._withValueTypeSerializer
(TypeSerializer vts) MapEntrySerializer._withValueTypeSerializer
(TypeSerializer vts) StringArraySerializer._withValueTypeSerializer
(TypeSerializer vts) Strings never add type info; hence, even if type serializer is suggested, we'll ignore it...void
BeanAsArraySerializer.serializeWithType
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) void
IndexedStringListSerializer.serializeWithType
(List<String> value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
MapEntrySerializer.serializeWithType
(Map.Entry<?, ?> value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
StringCollectionSerializer.serializeWithType
(Collection<String> value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
TypeWrappedSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
UnknownSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer) void
UnwrappingBeanSerializer.serializeWithType
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) IndexedListSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) IteratorSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) Constructors in com.fasterxml.jackson.databind.ser.impl with parameters of type TypeSerializerModifierConstructorDescriptionIndexedListSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer) IndexedListSerializer
(IndexedListSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle) IteratorSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts) IteratorSerializer
(IteratorSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle) MapEntrySerializer
(JavaType type, JavaType keyType, JavaType valueType, boolean staticTyping, TypeSerializer vts, BeanProperty property) protected
MapEntrySerializer
(MapEntrySerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> keySer, JsonSerializer<?> valueSer) Deprecated.protected
MapEntrySerializer
(MapEntrySerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> keySer, JsonSerializer<?> valueSer, Object suppressableValue, boolean suppressNulls) TypeWrappedSerializer
(TypeSerializer typeSer, JsonSerializer<?> ser) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.ser.std
Fields in com.fasterxml.jackson.databind.ser.std declared as TypeSerializerModifier and TypeFieldDescriptionprotected final TypeSerializer
MapProperty._typeSerializer
protected final TypeSerializer
AsArraySerializerBase._valueTypeSerializer
Type serializer used for values, if any.protected final TypeSerializer
JsonValueSerializer._valueTypeSerializer
protected final TypeSerializer
MapSerializer._valueTypeSerializer
Type identifier serializer used for values, if any.protected final TypeSerializer
ObjectArraySerializer._valueTypeSerializer
Type serializer to use for values, if any.protected final TypeSerializer
ReferenceTypeSerializer._valueTypeSerializer
Type serializer used for values, if any.Methods in com.fasterxml.jackson.databind.ser.std with parameters of type TypeSerializerModifier and TypeMethodDescriptionprotected void
BeanSerializerBase._serializeObjectId
(Object bean, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId) protected final void
BeanSerializerBase._serializeWithObjectId
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) protected final com.fasterxml.jackson.core.type.WritableTypeId
BeanSerializerBase._typeIdDef
(TypeSerializer typeSer, Object bean, com.fasterxml.jackson.core.JsonToken valueShape) CollectionSerializer._withValueTypeSerializer
(TypeSerializer vts) EnumSetSerializer._withValueTypeSerializer
(TypeSerializer vts) IterableSerializer._withValueTypeSerializer
(TypeSerializer vts) MapSerializer._withValueTypeSerializer
(TypeSerializer vts) ObjectArraySerializer._withValueTypeSerializer
(TypeSerializer vts) StdArraySerializers.BooleanArraySerializer._withValueTypeSerializer
(TypeSerializer vts) Booleans never add type info; hence, even if type serializer is suggested, we'll ignore it...StdArraySerializers.DoubleArraySerializer._withValueTypeSerializer
(TypeSerializer vts) Doubles never add type info; hence, even if type serializer is suggested, we'll ignore it...StdArraySerializers.IntArraySerializer._withValueTypeSerializer
(TypeSerializer vts) Ints never add type info; hence, even if type serializer is suggested, we'll ignore it...final ContainerSerializer
<?> StdArraySerializers.TypedPrimitiveArraySerializer._withValueTypeSerializer
(TypeSerializer vts) static JsonValueSerializer
JsonValueSerializer.construct
(SerializationConfig config, AnnotatedMember accessor, TypeSerializer vts, JsonSerializer<?> ser) static MapSerializer
MapSerializer.construct
(String[] ignoredList, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) Deprecated.Since 2.8 use the other overloadstatic MapSerializer
MapSerializer.construct
(Set<String> ignoredEntries, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) static MapSerializer
MapSerializer.construct
(Set<String> ignoredEntries, Set<String> includedEntries, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) final void
ArraySerializerBase.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
AsArraySerializerBase.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
BeanSerializerBase.serializeWithType
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) final void
BooleanSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
ByteArraySerializer.serializeWithType
(byte[] value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
InetAddressSerializer.serializeWithType
(InetAddress value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
InetSocketAddressSerializer.serializeWithType
(InetSocketAddress value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
JsonValueSerializer.serializeWithType
(Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer0) void
MapSerializer.serializeWithType
(Map<?, ?> value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) final void
NonTypedScalarSerializerBase.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) Deprecated.void
NullSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) Although this method should rarely get called, for convenience we should override it, and handle it same way as "natural" types: by serializing exactly as is, without type decorations.void
NumberSerializers.DoubleSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
NumberSerializers.IntegerSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) void
RawSerializer.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
ReferenceTypeSerializer.serializeWithType
(T ref, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) final void
SerializableSerializer.serializeWithType
(JsonSerializable value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) abstract void
StaticListSerializerBase.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
StdArraySerializers.CharArraySerializer.serializeWithType
(char[] value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
StdDelegatingSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) void
StdScalarSerializer.serializeWithType
(T value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix.final void
StringSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) void
TimeZoneSerializer.serializeWithType
(TimeZone value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) void
ToEmptyObjectSerializer.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer) final void
TokenBufferSerializer.serializeWithType
(TokenBuffer value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) Implementing typed output for contents of a TokenBuffer is very tricky, since we do not know for sure what its contents might look like (or, rather, we do know when serializing, but not necessarily when deserializing!) One possibility would be to check the current token, and use that to determine if we would output JSON Array, Object or scalar value.void
ToStringSerializerBase.serializeWithType
(Object value, com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix.final AsArraySerializerBase
<T> AsArraySerializerBase.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer) Deprecated.since 2.6: use the overloaded method that takes 'unwrapSingle'abstract AsArraySerializerBase
<T> AsArraySerializerBase.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) protected ReferenceTypeSerializer
<AtomicReference<?>> AtomicReferenceSerializer.withResolved
(BeanProperty prop, TypeSerializer vts, JsonSerializer<?> valueSer, NameTransformer unwrapper) CollectionSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) EnumSetSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) IterableSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) protected JsonValueSerializer
JsonValueSerializer.withResolved
(BeanProperty property, TypeSerializer vts, JsonSerializer<?> ser, boolean forceTypeInfo) ObjectArraySerializer.withResolved
(BeanProperty prop, TypeSerializer vts, JsonSerializer<?> ser, Boolean unwrapSingle) protected abstract ReferenceTypeSerializer
<T> ReferenceTypeSerializer.withResolved
(BeanProperty prop, TypeSerializer vts, JsonSerializer<?> valueSer, NameTransformer unwrapper) Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.Constructors in com.fasterxml.jackson.databind.ser.std with parameters of type TypeSerializerModifierConstructorDescriptionprotected
AsArraySerializerBase
(AsArraySerializerBase<?> src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer) Deprecated.since 2.6: use the overloaded method that takes 'unwrapSingle'protected
AsArraySerializerBase
(AsArraySerializerBase<?> src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) protected
AsArraySerializerBase
(Class<?> cls, JavaType elementType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) General purpose constructor.protected
AsArraySerializerBase
(Class<?> cls, JavaType et, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> elementSerializer) Deprecated.Since 2.6 Use variants that either take 'src', or do NOT pass BeanPropertyprotected
AsArraySerializerBase
(Class<?> cls, JavaType et, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> elementSerializer) Non-contextual, "blueprint" constructor typically called when the first instance is created, without knowledge of property it was used via.protected
AtomicReferenceSerializer
(AtomicReferenceSerializer base, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSer, NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls) AtomicReferenceSerializer
(ReferenceType fullType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> ser) CollectionSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, BeanProperty property, JsonSerializer<Object> valueSerializer) Deprecated.since 2.6CollectionSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> valueSerializer) CollectionSerializer
(CollectionSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle) EnumSetSerializer
(EnumSetSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle) IterableSerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts) IterableSerializer
(IterableSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSerializer, Boolean unwrapSingle) JsonValueSerializer
(AnnotatedMember accessor, TypeSerializer vts, JsonSerializer<?> ser) Deprecated.JsonValueSerializer
(AnnotatedMember accessor, TypeSerializer vts, JsonSerializer<?> ser, Set<String> ignoredProperties) JsonValueSerializer
(JsonValueSerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> ser, boolean forceTypeInfo) MapProperty
(TypeSerializer typeSer, BeanProperty prop) protected
MapSerializer
(MapSerializer src, TypeSerializer vts, Object suppressableValue) Deprecated.// since 2.9protected
MapSerializer
(MapSerializer src, TypeSerializer vts, Object suppressableValue, boolean suppressNulls) protected
MapSerializer
(Set<String> ignoredEntries, JavaType keyType, JavaType valueType, boolean valueTypeIsStatic, TypeSerializer vts, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer) Deprecated.in 2.12, remove from 3.0protected
MapSerializer
(Set<String> ignoredEntries, Set<String> includedEntries, JavaType keyType, JavaType valueType, boolean valueTypeIsStatic, TypeSerializer vts, JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer) ObjectArraySerializer
(JavaType elemType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> elementSerializer) ObjectArraySerializer
(ObjectArraySerializer src, BeanProperty property, TypeSerializer vts, JsonSerializer<?> elementSerializer, Boolean unwrapSingle) protected
ReferenceTypeSerializer
(ReferenceTypeSerializer<?> base, BeanProperty property, TypeSerializer vts, JsonSerializer<?> valueSer, NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls) ReferenceTypeSerializer
(ReferenceType fullType, boolean staticTyping, TypeSerializer vts, JsonSerializer<Object> ser) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.type
Methods in com.fasterxml.jackson.databind.type with parameters of type TypeSerializerModifier and TypeMethodDescriptionvoid
TypeBase.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) -
Uses of TypeSerializer in com.fasterxml.jackson.databind.util
Methods in com.fasterxml.jackson.databind.util with parameters of type TypeSerializerModifier and TypeMethodDescriptionvoid
JSONPObject.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) void
JSONWrappedObject.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) void
RawValue.serializeWithType
(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer)