Class JsonXmlCollectionSerializer<T extends Collection<?>>
java.lang.Object
tools.jackson.databind.ValueSerializer<T>
com.norconex.commons.lang.bean.jackson.JsonXmlCollectionSerializer<T>
- Type Parameters:
T- Collection type to be serialized
- All Implemented Interfaces:
tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class JsonXmlCollectionSerializer<T extends Collection<?>>
extends tools.jackson.databind.ValueSerializer<T>
XML collection serializer. Adds support for
JsonXmlCollection
annotation and properly writes self-closing and empty tag pairs.
for null and empty, respectively.- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueSerializer
tools.jackson.databind.ValueSerializer.None -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJsonXmlCollectionSerializer(tools.jackson.databind.ValueSerializer<?> defaultSerializer) -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.ValueSerializer<?> createContextual(tools.jackson.databind.SerializationContext prov, tools.jackson.databind.BeanProperty property) voidresolve(tools.jackson.databind.SerializationContext ctxt) voidserialize(T objects, tools.jackson.core.JsonGenerator gen, tools.jackson.databind.SerializationContext sp) Methods inherited from class tools.jackson.databind.ValueSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Field Details
-
DEFAULT_INNER_NAME
- See Also:
-
-
Constructor Details
-
JsonXmlCollectionSerializer
public JsonXmlCollectionSerializer(tools.jackson.databind.ValueSerializer<?> defaultSerializer)
-
-
Method Details
-
createContextual
public tools.jackson.databind.ValueSerializer<?> createContextual(tools.jackson.databind.SerializationContext prov, tools.jackson.databind.BeanProperty property) throws tools.jackson.databind.DatabindException - Overrides:
createContextualin classtools.jackson.databind.ValueSerializer<T extends Collection<?>>- Throws:
tools.jackson.databind.DatabindException
-
resolve
public void resolve(tools.jackson.databind.SerializationContext ctxt) throws tools.jackson.databind.DatabindException - Overrides:
resolvein classtools.jackson.databind.ValueSerializer<T extends Collection<?>>- Throws:
tools.jackson.databind.DatabindException
-
serialize
public void serialize(T objects, tools.jackson.core.JsonGenerator gen, tools.jackson.databind.SerializationContext sp) - Specified by:
serializein classtools.jackson.databind.ValueSerializer<T extends Collection<?>>
-