Package com.openmeet.shared.helpers

# Class JSONResponse

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JSONResponse()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addPair(String key, String value)`
  Adds a pair to the response.
  `void`
  `clear()`
  Clears the response.
  `HashMap<String,String>`
  `getResponse()`
  Returns the response.
  `String`
  `getValue(String key)`
  Returns the value of the key.
  `String`
  `toString()`
  Returns the response as a JSON string.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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.