code: public static String getStringValue(JSONObject jsonObject, String key) throws JSONException {
  		checkArguments(jsonObject, key);
  		JSONValue value = jsonObject.get(key);
  		if (value != null) {
  			if (value.isString() != null) {
  				return ((JSONString) value).stringValue();
  			} else {
  				String valueString = value.toString();
  				if (!"null".equals(valueString)) {
  					if (valueString.charAt(0) == '"') {
  						return valueString.substring(1, valueString.length() - 1);
  					}
  					return valueString;
  				}
  			}
  		}
  		return null;
  	}
docs: Get a string value from a {@link JSONObject}.
  
  @param jsonObject The object to get the key value from.
  @param key The name of the key to search the value for.
  @return Returns the value for the key in the object or null.
  @throws JSONException Thrown in case the key could not be found in the JSON object.