public class AsWrapperTypeSerializer extends TypeSerializerBase
JsonTypeInfo.As.WRAPPER_ARRAY
mechanism as fallback: that is,
just use a wrapping array with type information as the first element
and value as second._idResolver, _property
Constructor | Description |
---|---|
AsWrapperTypeSerializer(TypeIdResolver idRes,
BeanProperty property) |
Modifier and Type | Method | Description |
---|---|---|
protected String |
_validTypeId(String typeId) |
Helper method used to ensure that intended type id is output as something that is valid:
currently only used to ensure that `null` output is converted to an empty String.
|
protected void |
_writeTypeId(com.fasterxml.jackson.core.JsonGenerator g,
String typeId) |
|
AsWrapperTypeSerializer |
forProperty(BeanProperty prop) |
Method called to create contextual version, to be used for
values of given property.
|
com.fasterxml.jackson.annotation.JsonTypeInfo.As |
getTypeInclusion() |
Accessor for type information inclusion method
that serializer uses; indicates how type information
is embedded in resulting JSON.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_writeLegacySuffix, typeId, typeId, typeId, writeCustomTypePrefixForArray, writeCustomTypePrefixForObject, writeCustomTypePrefixForScalar, writeCustomTypeSuffixForArray, writeCustomTypeSuffixForObject, writeCustomTypeSuffixForScalar, writeTypePrefixForArray, writeTypePrefixForArray, writeTypePrefixForObject, writeTypePrefixForObject, writeTypePrefixForScalar, writeTypePrefixForScalar, writeTypeSuffixForArray, writeTypeSuffixForObject, writeTypeSuffixForScalar
_generateTypeId, getPropertyName, getTypeIdResolver, handleMissingId, idFromValue, idFromValueAndType, writeTypePrefix, writeTypeSuffix
public AsWrapperTypeSerializer(TypeIdResolver idRes, BeanProperty property)
public AsWrapperTypeSerializer forProperty(BeanProperty prop)
TypeSerializer
Collection
or Map
valued properties).forProperty
in class TypeSerializer
public com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
TypeSerializer
getTypeInclusion
in class TypeSerializerBase
protected String _validTypeId(String typeId)
protected final void _writeTypeId(com.fasterxml.jackson.core.JsonGenerator g, String typeId) throws IOException
IOException
Copyright © 2008–2018. All rights reserved.