TypeSerializer that places typing metadata in Ion type annotations. It requires that the underlying
JsonGenerator is actually a tools.jackson.dataformat.ion.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
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | _generateTypeId(DatabindContext ctxt, WritableTypeId idMetadata)
Overrides tools. Helper method that will generate type id to use, if not already passed. |
| public TypeSerializer | forProperty(SerializationContext ctxt, BeanProperty prop)
Implements abstract tools. Method called to create contextual version, to be used for values of given property. |
| public JsonTypeInfo. | getTypeInclusion()
Implements abstract tools. Accessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON. |
| IonAnnotationTypeSerializer | back to summary |
|---|---|
| pack-priv IonAnnotationTypeSerializer(TypeIdResolver typeIdResolver) | |
| _generateTypeId | back to summary |
|---|---|
| protected final void _generateTypeId(DatabindContext ctxt, WritableTypeId idMetadata) Overrides tools. Doc from tools. Helper method that will generate type id to use, if not already passed.
| |
| forProperty | back to summary |
|---|---|
| public TypeSerializer forProperty(SerializationContext ctxt, BeanProperty prop) Implements abstract tools. Doc from tools. 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 Note since 3.0 has received context object as first argument.
| |
| getTypeInclusion | back to summary |
|---|---|
| public JsonTypeInfo. Implements abstract tools. Doc from tools. Accessor for type information inclusion method that serializer uses; indicates how type information is embedded in resulting JSON.
| |