Code example for JSONArray

Methods: getInt

0
	public static Integer getIntegerFromJsonArray(JSONArray array, int index) {
		Integer value = null;
		 
		try { 
			 
			value = array.getInt(index); 
			 
		} catch (JSONException jsone) {
			 
			if(LOGGER.isDebugEnabled()) { 
				LOGGER.debug("failed attempt to retrieve index " + index + " from JSON array " + array, jsone);
			} 
			 
		} 
		 
		return value;
	} 
	 
	/** 
	 * @return the JSONArray value found in the JSONArray using the provided index. If no value is found, null is returned.  
	 */