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 and Description |
|---|
AsWrapperTypeSerializer(TypeIdResolver idRes,
BeanProperty property) |
| Modifier and Type | Method and 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(JsonGenerator g,
String typeId) |
AsWrapperTypeSerializer |
forProperty(BeanProperty prop)
Method called to create contextual version, to be used for
values of given property.
|
JsonTypeInfo.As |
getTypeInclusion()
Accessor for type information inclusion method
that serializer uses; indicates how type information
is embedded in resulting JSON.
|
_generateTypeId, 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, writeTypeSuffixForScalarpublic AsWrapperTypeSerializer(TypeIdResolver idRes, BeanProperty property)
public AsWrapperTypeSerializer forProperty(BeanProperty prop)
TypeSerializerCollection or Map
valued properties).forProperty in class TypeSerializerpublic JsonTypeInfo.As getTypeInclusion()
TypeSerializergetTypeInclusion in class TypeSerializerBaseprotected String _validTypeId(String typeId)
protected final void _writeTypeId(JsonGenerator g, String typeId) throws IOException
IOExceptionCopyright © 2008–2018 FasterXML. All rights reserved.