code: public String getString(String key) throws JSONException {
          Object object = this.get(key);
          if (object instanceof String) {
              return (String) object;
          }
          throw new JSONException("JSONObject[" + quote(key) + "] not a string.");
      }
docs: Get the string associated with a key.
  
  @param key
  A key string.
  @return A string which is the value.
  @throws JSONException
  if there is no string value for the key.