Class JSONResponse

java.lang.Object
com.openmeet.shared.helpers.JSONResponse

public class JSONResponse extends Object
Class for building a JSON Response.
  • Constructor Details

    • JSONResponse

      public JSONResponse()
  • Method Details

    • getResponse

      public HashMap<String,String> getResponse()
      Returns the response.
      Returns:
      the response.
    • addPair

      public void addPair(String key, String value)
      Adds a pair to the response.
      Parameters:
      key - The key of the pair.
      value - The value of the pair.
    • getValue

      public String getValue(String key)
      Returns the value of the key.
      Parameters:
      key - The JSON object key.
      Returns:
      The value of the key.
    • clear

      public void clear()
      Clears the response.
    • toString

      public String toString()
      Returns the response as a JSON string.
      Overrides:
      toString in class Object
      Returns:
      this object in a JSON-like format.