Class MultiType.Serializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<MultiTypeWrapper>
tenapull.data.deserialize.MultiType.Serializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
Enclosing class:
MultiType

public static class MultiType.Serializer
extends com.fasterxml.jackson.databind.JsonSerializer<MultiTypeWrapper>
Serializes a MultiTypeWrapper into the appropriate JSON primitive
  • Nested Class Summary

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

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

    Constructors 
    Constructor Description
    Serializer()  
  • Method Summary

    Modifier and Type Method Description
    void serialize​(MultiTypeWrapper wrapper, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
    Serializes a MultiTypeWrapper into the appropriate JSON primitive, delegating to the static writeValueNotNull method for all non-null and non-string values.
    static boolean writeValue​(java.lang.Object object, com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
    Serializes an Object representing any primitive JSON type, delegating to writeValueNotNull for all non-null and non-string objects.

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

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

    Methods inherited from class java.lang.Object

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

  • Method Details

    • serialize

      public void serialize​(MultiTypeWrapper wrapper, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws java.io.IOException
      Serializes a MultiTypeWrapper into the appropriate JSON primitive, delegating to the static writeValueNotNull method for all non-null and non-string values. If writeValueNotNull returns false, meaning no value was written, then this method will default to writing the value as a string
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<MultiTypeWrapper>
      Parameters:
      wrapper -
      jsonGenerator -
      serializerProvider -
      Throws:
      java.io.IOException
    • writeValue

      public static boolean writeValue​(java.lang.Object object, com.fasterxml.jackson.core.JsonGenerator jsonGenerator) throws java.io.IOException
      Serializes an Object representing any primitive JSON type, delegating to writeValueNotNull for all non-null and non-string objects.
      Parameters:
      object -
      jsonGenerator -
      Returns:
      true when the jsonGenerator wrote a value, false if no matching type could be found and therefore no value was written.
      Throws:
      java.io.IOException