Class BaseSerializer<T>

    • Nested Class Summary

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

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

      • Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _handledType
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseSerializer​(Class<T> clazz)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void doSerialize​(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)  
      void serialize​(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)  
      void serializeWithType​(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)  
      protected void writeStringArray​(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Collection<String> values)
      Helper used to help serialize a list of strings.
      protected void writeStringMap​(com.fasterxml.jackson.core.JsonGenerator jgen, String fieldName, Map<String,​String> values)
      Helper used to help serialize a list of strings.
      • Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
    • Constructor Detail

      • BaseSerializer

        protected BaseSerializer​(Class<T> clazz)
    • Method Detail

      • serialize

        public void serialize​(T value,
                              com.fasterxml.jackson.core.JsonGenerator jgen,
                              com.fasterxml.jackson.databind.SerializerProvider provider)
                       throws IOException
        Specified by:
        serialize in interface VersionedSerDe.Serializer<T>
        Specified by:
        serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
        Throws:
        IOException
      • serializeWithType

        public void serializeWithType​(T value,
                                      com.fasterxml.jackson.core.JsonGenerator gen,
                                      com.fasterxml.jackson.databind.SerializerProvider serializers,
                                      com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
                               throws IOException
        Overrides:
        serializeWithType in class com.fasterxml.jackson.databind.JsonSerializer<T>
        Throws:
        IOException
      • writeStringArray

        protected void writeStringArray​(com.fasterxml.jackson.core.JsonGenerator jgen,
                                        String fieldName,
                                        Collection<String> values)
                                 throws IOException
        Helper used to help serialize a list of strings.
        Parameters:
        jgen - The json generator to use.
        fieldName - The name to associated to the resulting json array.
        values - The values to populate the array with.
        Throws:
        IOException - If an error occurs while writing to the generator.
      • writeStringMap

        protected void writeStringMap​(com.fasterxml.jackson.core.JsonGenerator jgen,
                                      String fieldName,
                                      Map<String,​String> values)
                               throws IOException
        Helper used to help serialize a list of strings.
        Parameters:
        jgen - The json generator to use.
        fieldName - The name to associated to the resulting json array.
        values - The values to populate the array with.
        Throws:
        IOException - If an error occurs while writing to the generator.