Code example for JSONObject

Methods: put, toString

0
  public String toJSON() throws JSONException {
    return toJSON(0); 
  } 
 
  public String toJSON(int i) throws JSONException {
    JSONObject o = new JSONObject();
    o.put("method", method);
    o.put("path", path);
    o.put("payload", payload);
    return o.toString(i);
  } 
 
  public String getMethod() {
    return method;
  } 
 
  public String getPath() {
    return path;
  } 
 
  public JSONObject getPayload() {