Class UnwrappingXmlBeanSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Object>
com.fasterxml.jackson.databind.ser.std.StdSerializer<Object>
com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
com.fasterxml.jackson.dataformat.xml.ser.UnwrappingXmlBeanSerializer
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,ContextualSerializer
,ResolvableSerializer
,Serializable
Copy of
UnwrappingBeanSerializer
required to extend
XmlBeanSerializerBase
for XML-specific handling.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
-
Field Summary
Fields inherited from class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
KEY_XML_INFO
-
Constructor Summary
ConstructorsConstructorDescriptionUnwrappingXmlBeanSerializer
(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter) UnwrappingXmlBeanSerializer
(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId) UnwrappingXmlBeanSerializer
(XmlBeanSerializerBase src, NameTransformer transformer) Constructor used for creating unwrapping instance of a standardBeanSerializer
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.final void
serialize
(Object bean, JsonGenerator jgen, SerializerProvider provider) Main serialization method that will delegate actual output to configuredBeanPropertyWriter
instances.toString()
unwrappingSerializer
(NameTransformer transformer) 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).withFilterId
(Object filterId) Mutant factory used for creating a new instance with different filter id (used withJsonFilter
annotation)withObjectIdWriter
(ObjectIdWriter objectIdWriter) Mutant factory used for creating a new instance with differentObjectIdWriter
.Methods inherited from class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
serializeWithType
Methods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
acceptJsonFormatVisitor, createContextual, getSchema, properties, resolve, usesObjectId
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
getSchema, handledType, wrapAndThrow, wrapAndThrow
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, replaceDelegatee, withIgnoredProperties
-
Constructor Details
-
UnwrappingXmlBeanSerializer
Constructor used for creating unwrapping instance of a standardBeanSerializer
-
UnwrappingXmlBeanSerializer
-
UnwrappingXmlBeanSerializer
public UnwrappingXmlBeanSerializer(UnwrappingXmlBeanSerializer src, ObjectIdWriter objectIdWriter, Object filterId)
-
-
Method Details
-
unwrappingSerializer
Description copied from class:JsonSerializer
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
- Overrides:
unwrappingSerializer
in classJsonSerializer<Object>
- Parameters:
transformer
- Name transformation to use to convert between names of unwrapper properties
-
isUnwrappingSerializer
public boolean isUnwrappingSerializer()Description copied from class:JsonSerializer
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.- Overrides:
isUnwrappingSerializer
in classJsonSerializer<Object>
-
withObjectIdWriter
Description copied from class:BeanSerializerBase
Mutant factory used for creating a new instance with differentObjectIdWriter
.- Specified by:
withObjectIdWriter
in classBeanSerializerBase
-
withFilterId
Description copied from class:BeanSerializerBase
Mutant factory used for creating a new instance with different filter id (used withJsonFilter
annotation)- Specified by:
withFilterId
in classBeanSerializerBase
-
serialize
public final void serialize(Object bean, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException Main serialization method that will delegate actual output to configuredBeanPropertyWriter
instances.- Specified by:
serialize
in classBeanSerializerBase
- Parameters:
bean
- Value to serialize; can not be null.jgen
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for serializing Objects value contains, if any.- Throws:
IOException
JsonGenerationException
-
toString
-