Class XmlBeanSerializer
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.XmlBeanSerializer
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,ContextualSerializer
,ResolvableSerializer
,Serializable
Variant of
BeanSerializer
for XML 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
ConstructorsConstructorDescriptionXmlBeanSerializer
(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter) XmlBeanSerializer
(XmlBeanSerializerBase src, ObjectIdWriter objectIdWriter, Object filterId) XmlBeanSerializer
(XmlBeanSerializerBase src, Set<String> toIgnore, Set<String> toInclude) -
Method Summary
Modifier and TypeMethodDescriptionvoid
serialize
(Object bean, JsonGenerator g, SerializerProvider provider) Main serialization method that will delegate actual output to configuredBeanPropertyWriter
instances.toString()
unwrappingSerializer
(NameTransformer unwrapper) 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, isUnwrappingSerializer, replaceDelegatee, withIgnoredProperties
-
Constructor Details
-
XmlBeanSerializer
-
XmlBeanSerializer
-
XmlBeanSerializer
-
XmlBeanSerializer
-
-
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:
unwrapper
- Name transformation to use to convert between names of unwrapper properties
-
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
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.g
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for serializing Objects value contains, if any.- Throws:
IOException
-
toString
-