Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.xml.ser

public Class UnwrappingXmlBeanSerializer

extends XmlBeanSerializerBase
Class Inheritance
Imports
java.io.IOException, java.util.Set, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.ser.*, com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter, .UnwrappingBeanSerializer, com.fasterxml.jackson.databind.ser.std.BeanSerializerBase, com.fasterxml.jackson.databind.util.NameTransformer

Deprecated

as a consequence of XmlBeanSerializerBase being deprecated. See corresponding docs for further information.

Copy of UnwrappingBeanSerializer required to extend XmlBeanSerializerBase for XML-specific handling.
Author
Pascal Gélinas

Field Summary

Modifier and TypeField and Description
protected final NameTransformer
_nameTransformer

Transformer used to add prefix and/or suffix for properties of unwrapped POJO.

private static final long
Inherited from com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase:
_attributeCount_cdata_textPropertyIndex_xmlNamesKEY_XML_INFO

Constructor Summary

AccessConstructor and Description
public
UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src, NameTransformer transformer)

Deprecated as a consequence of XmlBeanSerializerBase being deprecated.
Constructor used for creating unwrapping instance of a standard BeanSerializer
public
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter)

Deprecated as a consequence of UnwrappingXmlBeanSerializer being deprecated.
public
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId)

Deprecated as a consequence of UnwrappingXmlBeanSerializer being deprecated.
protected
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, Set<String> toIgnore, Set<String> toInclude)

Deprecated as a consequence of UnwrappingXmlBeanSerializer being deprecated.
protected
UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Deprecated as a consequence of UnwrappingXmlBeanSerializer being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected BeanSerializerBase
asArraySerializer()

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.asArraySerializer.

Deprecated as a consequence of BeanSerializerBase being deprecated.
JSON Array output can not be done if unwrapping operation is requested; so implementation will simply return 'this'.
public boolean
isUnwrappingSerializer()

Overrides com.fasterxml.jackson.databind.JsonSerializer.isUnwrappingSerializer.

Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name.
public final void
serialize(Object
Value to serialize; can not be null.
bean
,
JsonGenerator
Generator used to output resulting Json content
jgen
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
provider
)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serialize.

Main serialization method that will delegate actual output to configured BeanPropertyWriter instances.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public JsonSerializer<Object>
unwrappingSerializer(NameTransformer
Name transformation to use to convert between names of unwrapper properties
transformer
)

Overrides com.fasterxml.jackson.databind.JsonSerializer.unwrappingSerializer.

Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output).
protected BeanSerializerBase
withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withByNameInclusion.

Deprecated as a consequence of BeanSerializerBase being deprecated.
Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)
public BeanSerializerBase
withFilterId(Object filterId)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withFilterId.

Deprecated as a consequence of BeanSerializerBase being deprecated.
Mutant factory used for creating a new instance with different filter id (used with JsonFilter annotation)
public BeanSerializerBase
withObjectIdWriter(ObjectIdWriter objectIdWriter)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withObjectIdWriter.

Deprecated as a consequence of BeanSerializerBase being deprecated.
Mutant factory used for creating a new instance with different ObjectIdWriter.
protected BeanSerializerBase
withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withProperties.

Deprecated as a consequence of BeanSerializerBase being deprecated.
Mutant factory used for creating a new instance with modified set of properties.
Inherited from com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase:
_isAttribute_isCData_orderAttributesFirst_serializeObjectIdserializeFieldsserializeFieldsFilteredserializeWithType

Field Detail

_nameTransformerback to summary
protected final NameTransformer _nameTransformer

Transformer used to add prefix and/or suffix for properties of unwrapped POJO.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.ser.std.StdSerializer.serialVersionUID.

Constructor Detail

UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(XmlBeanSerializerBase src, NameTransformer transformer)

Deprecated

as a consequence of XmlBeanSerializerBase being deprecated. See corresponding docs for further information.

Constructor used for creating unwrapping instance of a standard BeanSerializer

UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter)

Deprecated

as a consequence of UnwrappingXmlBeanSerializer being deprecated. See corresponding docs for further information.

UnwrappingXmlBeanSerializerback to summary
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId)

Deprecated

as a consequence of UnwrappingXmlBeanSerializer being deprecated. See corresponding docs for further information.

UnwrappingXmlBeanSerializerback to summary
protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, Set<String> toIgnore, Set<String> toInclude)

Deprecated

as a consequence of UnwrappingXmlBeanSerializer being deprecated. See corresponding docs for further information.

UnwrappingXmlBeanSerializerback to summary
protected UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Deprecated

as a consequence of UnwrappingXmlBeanSerializer being deprecated. See corresponding docs for further information.

Method Detail

asArraySerializerback to summary
protected BeanSerializerBase asArraySerializer()

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.asArraySerializer.

Deprecated

as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.

JSON Array output can not be done if unwrapping operation is requested; so implementation will simply return 'this'.

Annotations
@Override
isUnwrappingSerializerback to summary
public boolean isUnwrappingSerializer()

Overrides com.fasterxml.jackson.databind.JsonSerializer.isUnwrappingSerializer.

Doc from com.fasterxml.jackson.databind.JsonSerializer.isUnwrappingSerializer.

Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name.

Annotations
@Override
serializeback to summary
public final void serialize(Object bean, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serialize.

Main serialization method that will delegate actual output to configured BeanPropertyWriter instances.

Parameters
bean:Object

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Value to serialize; can not be null.

jgen:JsonGenerator

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Generator used to output resulting Json content

provider:SerializerProvider

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Provider that can be used to get serializers for serializing Objects value contains, if any.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
unwrappingSerializerback to summary
public JsonSerializer<Object> unwrappingSerializer(NameTransformer transformer)

Overrides com.fasterxml.jackson.databind.JsonSerializer.unwrappingSerializer.

Doc from com.fasterxml.jackson.databind.JsonSerializer.unwrappingSerializer.

Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). If no unwrapped serializer can be constructed, will simply return serializer as-is.

Default implementation just returns serializer as-is, indicating that no unwrapped variant exists

Parameters
transformer:NameTransformer

Name transformation to use to convert between names of unwrapper properties

Annotations
@Override
withByNameInclusionback to summary
protected BeanSerializerBase withByNameInclusion(Set<String> toIgnore, Set<String> toInclude)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withByNameInclusion.

Doc from com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withByNameInclusion.

Deprecated

as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.

Mutant factory used for creating a new instance with additional set of properties to ignore or include (from properties this instance otherwise has)

Annotations
@Override
withFilterIdback to summary
public BeanSerializerBase withFilterId(Object filterId)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withFilterId.

Doc from com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withFilterId.

Deprecated

as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.

Mutant factory used for creating a new instance with different filter id (used with JsonFilter annotation)

Annotations
@Override
withObjectIdWriterback to summary
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withObjectIdWriter.

Doc from com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withObjectIdWriter.

Deprecated

as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.

Mutant factory used for creating a new instance with different ObjectIdWriter.

Annotations
@Override
withPropertiesback to summary
protected BeanSerializerBase withProperties(BeanPropertyWriter[] properties, BeanPropertyWriter[] filteredProperties)

Implements abstract com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withProperties.

Doc from com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.withProperties.

Deprecated

as a consequence of BeanSerializerBase being deprecated. See corresponding docs for further information.

Mutant factory used for creating a new instance with modified set of properties.

Note

in 2.11.x, need to keep non-abstract for slightly better compatibility (XML module extends)

Annotations
@Override