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
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonXmlCollectionSerializer(tools.jackson.databind.ValueSerializer<?> defaultSerializer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    tools.jackson.databind.ValueSerializer<?>
    createContextual(tools.jackson.databind.SerializationContext prov, tools.jackson.databind.BeanProperty property)
     
    void
    resolve(tools.jackson.databind.SerializationContext ctxt)
     
    void
    serialize(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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:
      createContextual in class tools.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:
      resolve in class tools.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:
      serialize in class tools.jackson.databind.ValueSerializer<T extends Collection<?>>