public class JSONPObject extends java.lang.Object implements JsonSerializableWithType
JSONWrappedObject
Modifier and Type | Field and 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 and Description |
---|
JSONPObject(java.lang.String function,
java.lang.Object value) |
JSONPObject(java.lang.String function,
java.lang.Object value,
java.lang.Class<?> rawType)
Deprecated.
Since 1.8; instead use variant that takes JavaType: this ensures
that type information is properly resolved
|
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 jgen,
SerializerProvider provider) |
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer) |
protected final java.lang.String _function
protected final java.lang.Object _value
protected final JavaType _serializationType
public JSONPObject(java.lang.String function, java.lang.Object value)
public JSONPObject(java.lang.String function, java.lang.Object value, JavaType asType)
@Deprecated public JSONPObject(java.lang.String function, java.lang.Object value, java.lang.Class<?> rawType)
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws java.io.IOException, JsonProcessingException
serializeWithType
in interface JsonSerializableWithType
java.io.IOException
JsonProcessingException
public void serialize(JsonGenerator jgen, SerializerProvider provider) throws java.io.IOException, JsonProcessingException
serialize
in interface JsonSerializable
java.io.IOException
JsonProcessingException
public java.lang.String getFunction()
public java.lang.Object getValue()
public JavaType getSerializationType()