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, writeTypeSuffixpublic AsWrapperTypeSerializer(TypeIdResolver idRes, BeanProperty property)
public AsWrapperTypeSerializer forProperty(BeanProperty prop)
TypeSerializerCollection or Map
valued properties).forProperty in class TypeSerializerpublic com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
TypeSerializergetTypeInclusion in class TypeSerializerBaseprotected String _validTypeId(String typeId)
protected final void _writeTypeId(com.fasterxml.jackson.core.JsonGenerator g,
String typeId)
throws IOException
IOExceptionCopyright © 2008–2018. All rights reserved.