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 TypeMethodDescriptionvoidserialize(Object bean, JsonGenerator g, SerializerProvider provider) Main serialization method that will delegate actual output to configuredBeanPropertyWriterinstances.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 withJsonFilterannotation)withObjectIdWriter(ObjectIdWriter objectIdWriter) Mutant factory used for creating a new instance with differentObjectIdWriter.Methods inherited from class com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializerBase
serializeWithTypeMethods inherited from class com.fasterxml.jackson.databind.ser.std.BeanSerializerBase
acceptJsonFormatVisitor, createContextual, getSchema, properties, resolve, usesObjectIdMethods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
getSchema, handledType, wrapAndThrow, wrapAndThrowMethods 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:JsonSerializerMethod 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:
unwrappingSerializerin classJsonSerializer<Object>- Parameters:
unwrapper- Name transformation to use to convert between names of unwrapper properties
-
withObjectIdWriter
Description copied from class:BeanSerializerBaseMutant factory used for creating a new instance with differentObjectIdWriter.- Specified by:
withObjectIdWriterin classBeanSerializerBase
-
withFilterId
Description copied from class:BeanSerializerBaseMutant factory used for creating a new instance with different filter id (used withJsonFilterannotation)- Specified by:
withFilterIdin classBeanSerializerBase
-
serialize
Main serialization method that will delegate actual output to configuredBeanPropertyWriterinstances.- Specified by:
serializein 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
-