This function will parsing JSON feeds in Android java:

public JSONArray parsingDatawithURL (String url) {
try {
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(new HttpGet(url));
StatusLine statusLine = response.getStatusLine();
if (statusLine.getStatusCode() == HttpStatus.SC_OK) {
InputStream inputStream = null;
String json = null;
// get entity from response
HttpEntity entity = response.getEntity();
// get content of each inputstream
inputStream = entity.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"), 8);
json = reader.readLine();
// extract JSONArray
JSONArray jobjs = new JSONArray(json);
//jobjs = (JSONArray) jobjs.optJSONArray(0);
return jobjs;
}
else{
//Closes the connection.
response.getEntity().getContent().close();
throw new IOException(statusLine.getReasonPhrase());
}
} catch (Exception e) {
// Close connection
System.out.println(url + e.toString());
return null;
}
}