Package org.eclipse.persistence.oxm
Class JSONWithPadding<T>
- java.lang.Object
-
- org.eclipse.persistence.oxm.JSONWithPadding<T>
-
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"}});
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CALLBACK_NAME
-
Constructor Summary
Constructors Constructor Description JSONWithPadding()
JSONWithPadding(T rootObject)
JSONWithPadding(T rootObject, java.lang.String callbackName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCallbackName()
The callback name that should me marshalled with the objectT
getObject()
The Object that will be marshalledvoid
setCallbackName(java.lang.String callbackName)
The callback name that should me marshalled with the objectvoid
setObject(T rootObject)
The Object to be marshalled
-
-
-
Field Detail
-
DEFAULT_CALLBACK_NAME
public static final java.lang.String DEFAULT_CALLBACK_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObject
public T getObject()
The Object that will be marshalled- Returns:
-
setObject
public void setObject(T rootObject)
The Object to be marshalled- Parameters:
rootObject
-
-
getCallbackName
public java.lang.String getCallbackName()
The callback name that should me marshalled with the object- Returns:
-
setCallbackName
public void setCallbackName(java.lang.String callbackName)
The callback name that should me marshalled with the object
-
-