Re: [android-developers] Parsing JSON data

2012-04-04 Thread lbendlin
your JSON string has multiple hierarchy levels. Instead of a simple for() loop you need a construct that considers that hierarchy. On Wednesday, April 4, 2012 7:31:31 AM UTC-4, Mini agrawal wrote: > > Thanks for reply, still i am getting an parsing error. > What will be jsonString here?(for a gi

Re: [android-developers] Parsing JSON data

2012-04-04 Thread atul gangwar
String jsonString= " *{"id":315,"name":"Sagar Ratna","url":"http:\/\/ www.zomato.com\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315","location":{"address":"B-1, A-11 Mohan Co-operative Ind Area, Mathura Road, New Delhi","locality":"Mathura Road","city":"Delhi","latitude":"28.5

Re: [android-developers] Parsing JSON data

2012-04-03 Thread atul gangwar
Hi, For parsing json data: pass the json sting to JSONArray as below. JSONArray jsonArray = new JSONArray(jsonString); create JSONObject ; JSONObject json_data = null; run one loop as below to fetch each element of the array. for (int i = 0; i < jsonArray.length(); i++) { json_data = jsonArr

[android-developers] Parsing JSON from Grails application

2011-11-09 Thread vidya
Hi, I'm an Android newbie and am trying to parse/receive JSON data sent from a Grails Web application (controller-action). I'd appreciate any pointers in this direction or some sample code that shows how to exchange JSON data between an Android application and a Grails application. Thanks in adva

Re: [android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-11-02 Thread Ashish Tiwari
I fixed that problem, by using this, String json = "{"+ "name:\"ashish\", " + "message:\"hey see this\", " + "place:\"gurgaon\", " + "date:\"aaj ka date hai \" " + "}"; Thanks for your sugge

Re: [android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-11-02 Thread Ashish Tiwari
Tried "JSONObject object = new JSONObject(json);" but result is same ... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

Re: [android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-10-31 Thread silenuz nowan
What happens if you use: JSONObject object = new JSONObject(json); and omit the tokenizer. --- On Mon, 10/31/11, Ashish Tiwari wrote: From: Ashish Tiwari Subject: [android-developers] Parsing JSON data using JSONTokener shows nothing ... To: android-developers@googlegroups.com Received

[android-developers] Parsing JSON data using JSONTokener shows nothing ...

2011-10-31 Thread Ashish Tiwari
package com.json.main; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class JSONtestActivity extends Activity { /** Called when the activity is first created.

Re: [android-developers] Parsing JSON

2011-06-21 Thread Miguel Morales
Yep On Tue, Jun 21, 2011 at 1:51 PM, Jorge Luis wrote: > after that i should use json.getBoolean and json.getString? > > > 2011/6/21 Miguel Morales > >> JSONObject json = new JSONObject(jsonString); >> >> On Tue, Jun 21, 2011 at 1:48 PM, Jorge Luis wrote: >> >>> How do i simply parse {"status":

Re: [android-developers] Parsing JSON

2011-06-21 Thread Jorge Luis
after that i should use json.getBoolean and json.getString? 2011/6/21 Miguel Morales > JSONObject json = new JSONObject(jsonString); > > On Tue, Jun 21, 2011 at 1:48 PM, Jorge Luis wrote: > >> How do i simply parse {"status":true,"msg":"Logged In."}? >> >> Thx >> >> -- >> Jorge Luis Ferrari Cé >

Re: [android-developers] Parsing JSON

2011-06-21 Thread Miguel Morales
JSONObject json = new JSONObject(jsonString); On Tue, Jun 21, 2011 at 1:48 PM, Jorge Luis wrote: > How do i simply parse {"status":true,"msg":"Logged In."}? > > Thx > > -- > Jorge Luis Ferrari Cé > Desenvolvedor / Web Designer > Siga @JLFerrari > > > -- > You received this message because you a

[android-developers] Parsing JSON

2011-06-21 Thread Jorge Luis
How do i simply parse {"status":true,"msg":"Logged In."}? Thx -- Jorge Luis Ferrari Cé Desenvolvedor / Web Designer Siga @JLFerrari -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@g

Re: [android-developers] parsing json data in android

2011-05-25 Thread Nandagopal T
Yeah, mark is right. Its a JSONArray. On Wed, May 25, 2011 at 11:48 PM, Mark Murphy wrote: > The error message is correct. "final" is not a JSONObject. It is a > JSONArray. You can tell that by the square brackets, instead of > braces. > > On Wed, May 25, 2011 at 1:57 PM, Expressions Unlimitted >

Re: [android-developers] parsing json data in android

2011-05-25 Thread Mark Murphy
The error message is correct. "final" is not a JSONObject. It is a JSONArray. You can tell that by the square brackets, instead of braces. On Wed, May 25, 2011 at 1:57 PM, Expressions Unlimitted wrote: > I am facing problem with parsing json data. Here is my json > json string : {"final":[{"id":1

[android-developers] parsing json data in android

2011-05-25 Thread Expressions Unlimitted
I am facing problem with parsing json data. Here is my json *json string : {"final":[{"id":1,"value":14,"name":"Mohammad Arif"}]}* * * and here is android code : *String jsonstring=jsonstring;* // the above json string *jobject=new JSONObject(jsonstring);* *JSONObject object=jobje