Class JSONWithPadding<T>

java.lang.Object
org.eclipse.persistence.oxm.JSONWithPadding<T>

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"}});

  • Field Details

  • Constructor Details

    • JSONWithPadding

      public JSONWithPadding()
    • JSONWithPadding

      public JSONWithPadding(T rootObject)
    • JSONWithPadding

      public JSONWithPadding(T rootObject, String callbackName)
  • Method Details

    • getObject

      public T getObject()
      The Object that will be marshalled
    • setObject

      public void setObject(T rootObject)
      The Object to be marshalled
    • getCallbackName

      public String getCallbackName()
      The callback name that should me marshalled with the object
    • setCallbackName

      public void setCallbackName(String callbackName)
      The callback name that should me marshalled with the object