public class JSONPObject extends java.lang.Object implements JsonSerializable
JSONWrappedObject
JsonSerializable.Base
Constructor and Description |
---|
JSONPObject(java.lang.String function,
java.lang.Object value) |
JSONPObject(java.lang.String function,
java.lang.Object value,
JavaType asType) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFunction() |
JavaType |
getSerializationType() |
java.lang.Object |
getValue() |
void |
serialize(JsonGenerator gen,
SerializerProvider provider)
Serialization method called when no additional type information is
to be included in serialization.
|
void |
serializeWithType(JsonGenerator gen,
SerializerProvider provider,
TypeSerializer typeSer)
Serialization method called when additional type information is
expected to be included in serialization, for deserialization to use.
|
public JSONPObject(java.lang.String function, java.lang.Object value)
public JSONPObject(java.lang.String function, java.lang.Object value, JavaType asType)
public void serializeWithType(JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws java.io.IOException
JsonSerializable
Usually implementation consists of a call to TypeSerializer.writeTypePrefix(com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.core.type.WritableTypeId)
followed by serialization of contents,
followed by a call to TypeSerializer.writeTypeSuffix(com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.core.type.WritableTypeId)
).
Details of the type id argument to pass depend on shape of JSON Object used
(Array, Object or scalar like String/Number/Boolean).
Note that some types (most notably, "natural" types: String, Integer, Double and Boolean) never include type information.
serializeWithType
in interface JsonSerializable
java.io.IOException
public void serialize(JsonGenerator gen, SerializerProvider provider) throws java.io.IOException
JsonSerializable
serialize
in interface JsonSerializable
java.io.IOException
public java.lang.String getFunction()
public java.lang.Object getValue()
public JavaType getSerializationType()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"