public class JSONWithPadding<T> extends 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 String |
DEFAULT_CALLBACK_NAME |
Constructor and Description |
---|
JSONWithPadding() |
JSONWithPadding(T rootObject) |
JSONWithPadding(T rootObject,
String callbackName) |
Modifier and Type | Method and Description |
---|---|
String |
getCallbackName()
The callback name that should me marshalled with the object
|
T |
getObject()
The Object that will be marshalled
|
void |
setCallbackName(String callbackName)
The callback name that should me marshalled with the object
|
void |
setObject(T rootObject)
The Object to be marshalled
|
public static final String DEFAULT_CALLBACK_NAME
public JSONWithPadding()
public JSONWithPadding(T rootObject)
public T getObject()
public void setObject(T rootObject)
rootObject
- public String getCallbackName()
public void setCallbackName(String callbackName)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.