Class JSONPObject

  • All Implemented Interfaces:
    JsonSerializable

    public class JSONPObject
    extends java.lang.Object
    implements JsonSerializable
    Container class that can be used to wrap any Object instances (including nulls), and will serialize embedded in JSONP wrapping.
    See Also:
    JSONWrappedObject
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String _function
      JSONP function name to use for serialization
      protected JavaType _serializationType
      Optional static type to use for serialization; if null, runtime type is used.
      protected java.lang.Object _value
      Value to be serialized as JSONP padded; can be null.
    • Constructor Summary

      Constructors 
      Constructor Description
      JSONPObject​(java.lang.String function, java.lang.Object value)  
      JSONPObject​(java.lang.String function, java.lang.Object value, JavaType asType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFunction()  
      JavaType getSerializationType()  
      java.lang.Object getValue()  
      void serialize​(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider)
      Serialization method called when no additional type information is to be included in serialization.
      void serializeWithType​(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer)
      Serialization method called when additional type information is expected to be included in serialization, for deserialization to use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _function

        protected final java.lang.String _function
        JSONP function name to use for serialization
      • _value

        protected final java.lang.Object _value
        Value to be serialized as JSONP padded; can be null.
      • _serializationType

        protected final JavaType _serializationType
        Optional static type to use for serialization; if null, runtime type is used. Can be used to specify declared type which defines serializer to use, as well as aspects of extra type information to include (if any).
    • Constructor Detail

      • JSONPObject

        public JSONPObject​(java.lang.String function,
                           java.lang.Object value)
      • JSONPObject

        public JSONPObject​(java.lang.String function,
                           java.lang.Object value,
                           JavaType asType)