android - Json parsing right solution -
hi stuck in wired kind of problem.may not able use mind right.
i getting json response like
{ "result":[ "entertainment", "business", "sports", "technology"] }
i able first value i,e result value in post-execute loop response is
["entertainment","business","sports","technology"]
now problem getting response string not array. how fetch these values separately. please asap
problem getting response string not array
=> said having response string, need create jsonobject response string getting , fetch jsonarray using below:
try{ jsonobject objjson = new jsonobject(objresponse); jsonarray arrayresponse = objjson.getjsonarray("result"); // iterate through jsonarray , fetch 1 one string } catch (jsonexception e) { // todo auto-generated catch block e.printstacktrace(); }
Comments
Post a Comment