org.springframework.boot.jackson

Class JsonObjectSerializer<T>

  • java.lang.Object
    • com.fasterxml.jackson.databind.JsonSerializer<T>
      • org.springframework.boot.jackson.JsonObjectSerializer<T>
  • Type Parameters:
    T - the supported object type
    All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable


    public abstract class JsonObjectSerializer<T>
    extends com.fasterxml.jackson.databind.JsonSerializer<T>
    Helper base class for JsonSerializer implementations that serialize objects.
    Since:
    1.4.0
    Author:
    Phillip Webb
    See Also:
    JsonObjectDeserializer
    • 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 Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void serialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) 
      protected abstract void serializeObject(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)
      Serialize JSON content into the value type this serializer handles.
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

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

      • JsonObjectSerializer

        public JsonObjectSerializer()
    • Method Detail

      • serialize

        public final void serialize(T value,
                                    com.fasterxml.jackson.core.JsonGenerator jgen,
                                    com.fasterxml.jackson.databind.SerializerProvider provider)
                             throws IOException
        Specified by:
        serialize in class com.fasterxml.jackson.databind.JsonSerializer<T>
        Throws:
        IOException
      • serializeObject

        protected abstract void serializeObject(T value,
                                                com.fasterxml.jackson.core.JsonGenerator jgen,
                                                com.fasterxml.jackson.databind.SerializerProvider provider)
                                         throws IOException
        Serialize JSON content into the value type this serializer handles.
        Parameters:
        value - the source value
        jgen - the JSON generator
        provider - the serializer provider
        Throws:
        IOException - on error

Copyright © 2017 Pivotal Software, Inc.. All rights reserved.