Package org.eclipse.persistence.oxm
Class JSONWithPadding<T>
java.lang.Object
org.eclipse.persistence.oxm.JSONWithPadding<T>
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
-
Constructor Summary
ConstructorDescriptionJSONWithPadding
(T rootObject) JSONWithPadding
(T rootObject, String callbackName) -
Method Summary
Modifier and TypeMethodDescriptionThe callback name that should me marshalled with the objectThe Object that will be marshalledvoid
setCallbackName
(String callbackName) The callback name that should me marshalled with the objectvoid
The Object to be marshalled
-
Field Details
-
DEFAULT_CALLBACK_NAME
- See Also:
-
-
Constructor Details
-
JSONWithPadding
public JSONWithPadding() -
JSONWithPadding
-
JSONWithPadding
-
-
Method Details
-
getObject
The Object that will be marshalled- Returns:
-
setObject
The Object to be marshalled- Parameters:
rootObject
-
-
getCallbackName
The callback name that should me marshalled with the object- Returns:
-
setCallbackName
The callback name that should me marshalled with the object
-