public List < JSONObject > getRecords ( ) { List < JSONObject > records = new ArrayList < JSONObject > ( ) ; try { if ( data != null && data . has ( getRecordParam ) ) { JSONObject jsonGetRecord = data . getJSONObject ( getRecordParam ) ; if ( jsonGetRecord . has ( recordParam ) ) { JSONArray jsonRecords = jsonGetRecord . getJSONArray ( recordParam ) ; for ( int i = 0 ; i < jsonRecords . length ( ) ; i ++ ) { JSONObject record = jsonRecords . getJSONObject ( i ) ; records . add ( record ) ; } } } } catch ( JSONException e ) { //This is already handled by the enclosing "has" checks } return records ; }
Returns records from harvest request