I have JSON data like this:
"books": [
{
"rating": {},
"subtitle": "",
"author": [
"The OReilly Java Authors"
],
"pubdate": "2003-9",
"tags": [],
"origin_title": "",
…… …… …… …… … …
and I want get the author data,some "author"data has more than one author,but I just confused weather I could parse it like this:
JSONArray jsonbooks = mess.getJSONArray("books");
for(blabla){
JSONObject obj = jsonbooks.getJSONObject(i);
obj.getJSONArray("author").get(1):
or
JSONArray jsonbooks = mess.getJSONArray("books");
for(blabla){
JSONObject obj = jsonbooks.getJSONObject(i);
obj.getString("author");
sencond way,I could get the data like"["author,blabla "],I want get rid off [" "],and I need more string processing,if there a better way looks like the first way?