|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.util.JSONPObject
public class JSONPObject
Container class that can be used to wrap any Object instances (including nulls), and will serialize embedded in JSONP wrapping.
JSONWrappedObject
Field Summary | |
---|---|
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 Summary | |
---|---|
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)
|
Method Summary | |
---|---|
String |
getFunction()
|
JavaType |
getSerializationType()
|
Object |
getValue()
|
void |
serialize(JsonGenerator jgen,
SerializerProvider provider)
|
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String _function
protected final Object _value
protected final JavaType _serializationType
Constructor Detail |
---|
public JSONPObject(String function, Object value)
public JSONPObject(String function, Object value, JavaType asType)
@Deprecated public JSONPObject(String function, Object value, Class<?> rawType)
Method Detail |
---|
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonProcessingException
serializeWithType
in interface JsonSerializableWithType
IOException
JsonProcessingException
public void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException
serialize
in interface JsonSerializable
IOException
JsonProcessingException
public String getFunction()
public Object getValue()
public JavaType getSerializationType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |