java - Parsing json array with no name in android -
i have json array string no name , want parse how can in android ?
my jsonarray :
[ { "categoryid":1, "title":"rock", "songs":null }, { "categoryid":2, "title":"jaz", "songs":null } ]
try this..
jsonarray jsonarray = new jsonarray(json); (int = 0; < jsonarray.length(); i++) { jsonobject jsonobj = jsonarray.getjsonobject(i); system.out.println("categoryid : " + + " = " + jsonobj.getstring("categoryid")); system.out.println("title : " + + " = " + jsonobj.getstring("title")); system.out.println("songs : " + + " = " + jsonobj.getstring("songs")); }
Comments
Post a Comment