Using JSON array from the previous post , one can do like this ,
String res = json_arr.get(0).toString(); //To get the first result.
obj = (JSONObject) new JSONTokener(res).nextValue();
String url = obj.getString("url"); //assuming url is one of the
field in JSON response.
Now u can display this in listview.
On Nov 23, 4:30 pm, sat <[email protected]> wrote:
> Assuming result = your JSON response.
>
> JSONObject json = null;
> JSONObject json_obj = null;
> JSONArray json_arr = null;
>
> json = new JSONObject(result.toString());
> json_obj = json.getJSONObject("responseData");
> json_arr = json_obj.getJSONArray("results");
>
> That should help you.
>
> On Nov 23, 1:12 pm, Atik <[email protected]> wrote:
>
> > hi guys,
> > i m stuck with an issue..
> > i have created json parser to parse the data from
> > thishttp://ajax.googleapis.com/ajax/services/search/local?v=1.0&sll=48.85...
> > i want to parse this data and wanna show in list view in android.
>
> > please give me sampple code. actually ihave done lot work on it but
> > still its not giving any output.
> > my contact mail id is [email protected]
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en