public class IonAnnotationTypeSerializer
extends com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase
TypeSerializer
that places typing metadata in Ion type annotations. It requires that the underlying
JsonGenerator
is actually a IonGenerator
.
Type serializers are responsible for handling the preamble and postamble of values, in addition to any possible
typing metadata (probably because type metadata can affect the pre/postamble content) -- in other words, once a
TypeSerializer
gets involved, serializers skip normal pre/postambles and assume the TypeSerializer will do it
instead. This is why we have to do more than write type metadata in our writeTypePrefix/Suffix* implementations.
MultipleTypeIdResolver
Modifier and Type | Method and Description |
---|---|
protected void |
_generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata) |
com.fasterxml.jackson.databind.jsontype.TypeSerializer |
forProperty(com.fasterxml.jackson.databind.BeanProperty prop) |
com.fasterxml.jackson.annotation.JsonTypeInfo.As |
getTypeInclusion() |
getPropertyName, getTypeIdResolver, handleMissingId, idFromValue, idFromValueAndType, writeTypePrefix, writeTypeSuffix
_writeLegacySuffix, typeId, typeId, typeId, writeCustomTypePrefixForArray, writeCustomTypePrefixForObject, writeCustomTypePrefixForScalar, writeCustomTypeSuffixForArray, writeCustomTypeSuffixForObject, writeCustomTypeSuffixForScalar, writeTypePrefixForArray, writeTypePrefixForArray, writeTypePrefixForObject, writeTypePrefixForObject, writeTypePrefixForScalar, writeTypePrefixForScalar, writeTypeSuffixForArray, writeTypeSuffixForObject, writeTypeSuffixForScalar
public com.fasterxml.jackson.databind.jsontype.TypeSerializer forProperty(com.fasterxml.jackson.databind.BeanProperty prop)
forProperty
in class com.fasterxml.jackson.databind.jsontype.TypeSerializer
public com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
getTypeInclusion
in class com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase
protected final void _generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
_generateTypeId
in class com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase
Copyright © 2020 FasterXML. All rights reserved.