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