public class JSONWithPadding<T>
extends java.lang.Object
JSONWithPadding is used to hold an Object along with the corresponding callback name to marshal.
Sample Usage: JSONWithPadding<Person> jsonWithPaddingObject = new JSONWithPadding(person, "theCallBackName"); Marshal this jsonWithPaddingObject object would result in JSON like this: theCallBackName({"person":{"id":10,"name":"Bob"}});
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CALLBACK_NAME |
Constructor and Description |
---|
JSONWithPadding() |
JSONWithPadding(T rootObject) |
JSONWithPadding(T rootObject,
java.lang.String callbackName) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallbackName()
The callback name that should me marshalled with the object
|
T |
getObject()
The Object that will be marshalled
|
void |
setCallbackName(java.lang.String callbackName)
The callback name that should me marshalled with the object
|
void |
setObject(T rootObject)
The Object to be marshalled
|
public static final java.lang.String DEFAULT_CALLBACK_NAME
public JSONWithPadding()
public JSONWithPadding(T rootObject)
public JSONWithPadding(T rootObject, java.lang.String callbackName)
public T getObject()
public void setObject(T rootObject)
rootObject
- public java.lang.String getCallbackName()
public void setCallbackName(java.lang.String callbackName)