Class OptionalSerializer

  • All Implemented Interfaces:
    org.codehaus.jackson.schema.SchemaAware

    public class OptionalSerializer
    extends org.codehaus.jackson.map.ser.std.SerializerBase<Optional>
    Serialize java Optional classes. Serializes the property if it is defined, or leaves it absent if it is not
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer

        org.codehaus.jackson.map.JsonSerializer.None
    • Field Summary

      • Fields inherited from class org.codehaus.jackson.map.ser.std.SerializerBase

        _handledType
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void serialize​(Optional option, org.codehaus.jackson.JsonGenerator jgen, org.codehaus.jackson.map.SerializerProvider provider)  
      • Methods inherited from class org.codehaus.jackson.map.ser.std.SerializerBase

        createObjectNode, createSchemaNode, createSchemaNode, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrow
      • Methods inherited from class org.codehaus.jackson.map.JsonSerializer

        isUnwrappingSerializer, serializeWithType, unwrappingSerializer
    • Constructor Detail

      • OptionalSerializer

        public OptionalSerializer()
    • Method Detail

      • serialize

        public void serialize​(Optional option,
                              org.codehaus.jackson.JsonGenerator jgen,
                              org.codehaus.jackson.map.SerializerProvider provider)
                       throws IOException
        Specified by:
        serialize in class org.codehaus.jackson.map.ser.std.SerializerBase<Optional>
        Throws:
        IOException