code: public static Long getLongValue(JSONObject jsonObject, String key) throws JSONException {
  		checkArguments(jsonObject, key);
  		JSONValue value = jsonObject.get(key);
  		if (value != null && value.isNumber() != null) {
  			double number = ((JSONNumber) value).doubleValue();
  			return new Long((long) number);
  		}
  		return null;
  	}
docs: Get a long 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 .
  @throws JSONException Thrown in case the key could not be found in the JSON object.