I'm relatively new to Android and never used any parsers before I'm trying to parse the following Json from Google books api, extracting the title of the book and author. This is the code so far:
public void parseJson(String stringFromInputStream)
{
String strParsed = null;
try
{
JSONobject jsonObject= new JSONObject(stringFromInputStream);
JSONArray jArray = jsonObject.getJSONArray("items");
for(int i = 0; i < jArray.length(); i++)
{
strParsed = jArray.getJSONObject(i).getString("volumeinfo").toString();
}
What I want to do in the above code is to loop through the JSON array which is "items" and get "volumeinfo" then from there I hope to extract title and author but I do not know how to continue. So I hope someone could point me to the right direction and correct me because the above are most likely incorrect.
Thanks.