Okay I have went through tons of examples on PARSing my JSON results, with no luck. I have the below JSON example I don\'t want status info or geoLocation right now. I just
Here's an example of how you would parse the array and display it in the listview. I didn't include the xml but it is pretty simple to describe the listview and multi-line result containing the txt fields for country and address (or whatever):
String[] from = new String[] {"row_1", "row_2"};
int[] to = new int[] { R.id.country, R.id.address};
List> fillMaps = new ArrayList>();
try {
JSONObject obj = new JSONObject(jsonString);
JSONArray stations = obj.getJSONArray("stations");
Log.i(TAG,"Number of entries " + stations.length());
for (int j = 0; j < stations.length(); j++) {
JSONObject jsonObject = stations.getJSONObject(j);
HashMap map = new HashMap();
map.put("row_1", jsonObject.getString("country"));
map.put("row_2", jsonObject.getString("address"));
fillMaps.add(map);
}
} catch (Exception e) {
e.printStackTrace();
}
SimpleAdapter adapter = new SimpleAdapter(context, fillMaps, R.layout.result, from, to);
mListView.setAdapter(adapter);