Class NoEntryWrapperListSerializer<T>

  • Type Parameters:
    T - serialized class within the list
    All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
    Direct Known Subclasses:
    LangStringsSerializer

    public class NoEntryWrapperListSerializer<T>
    extends com.fasterxml.jackson.databind.JsonSerializer<List<T>>
    Custom serializer for lists without individual list entry wrappers for parametrized classes.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        com.fasterxml.jackson.databind.JsonSerializer.None
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty​(com.fasterxml.jackson.databind.SerializerProvider provider, List<T> value)  
      void serialize​(List<T> list, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers)  
      void setOuterWrapper​(String outerWrapper)
      Sets the tag-name of the outer xml wrapper element.
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId
    • Constructor Detail

      • NoEntryWrapperListSerializer

        public NoEntryWrapperListSerializer()
    • Method Detail

      • setOuterWrapper

        public void setOuterWrapper​(String outerWrapper)
        Sets the tag-name of the outer xml wrapper element. By default, no outer wrapper is serialized.
        Parameters:
        outerWrapper - the tag name (without namespace)
      • serialize

        public void serialize​(List<T> list,
                              com.fasterxml.jackson.core.JsonGenerator gen,
                              com.fasterxml.jackson.databind.SerializerProvider serializers)
                       throws IOException
        Specified by:
        serialize in class com.fasterxml.jackson.databind.JsonSerializer<List<T>>
        Throws:
        IOException
      • isEmpty

        public boolean isEmpty​(com.fasterxml.jackson.databind.SerializerProvider provider,
                               List<T> value)
        Overrides:
        isEmpty in class com.fasterxml.jackson.databind.JsonSerializer<List<T>>