에서 JsonArray이 링크에서 데이터를 추출 할 - https://www.googleapis.com/books/v1/volumes?q=android&maxResults=16JsonArray
이 제목과 저자를 추출하는 내 코드는하지만 난 제목하지만 저자를 얻을 수 있습니다.
JSONObject root = new JSONObject(bookJSON);
JSONArray bookArray = root.getJSONArray("items");
String autho = " ";
for (int i = 0; i < bookArray.length(); i++) {
JSONObject currentBook = bookArray.getJSONObject(i);
JSONObject volumeInfo = currentBook.getJSONObject("volumeInfo");
String title = volumeInfo.getString("title");
Log.i("booktitle",title);
JSONArray auth = volumeInfo.getJSONArray("authors");
for (int j = 0; j > auth.length(); j++) {
autho = auth.getString(j);
Log.i("authorname",autho);
}
}
정확히 무엇이 당신의 질문입니까? – megalucio