Thank you so much folks. Thanks Suriya
On Apr 9, 12:56 am, Surya W. Madjid aya.fourth.relea...@gmail.com
wrote:
The way I do it is like this:
try
{
JSONArray mJsonArr = new JSONArray(jsonText); // your
JSON text
MUST be valid
Hi,
hmm I sent the email below a week ago but it still did not show up,
so here once more my version of parsing json:
Another option which works fine for me is:
http://jackson.codehaus.org/
and a tutorial with code samples:
http://wiki.fasterxml.com/JacksonInFiveMinutes
it
On Apr 12, 11:33 am, vworld4u vworl...@gmail.com wrote:
You can use JSON Parser readily available for this purpose. Since
Android platform is compliant with standard J2SE JDK, you can use the
readily available open source JSON parsers.
You do not need any 3rd party JSON parsers, as android
The way I do it is like this:
try
{
JSONArray mJsonArr = new JSONArray(jsonText); // your
JSON text
MUST be valid
IteratorString mIteratorList =
mJsonArr.getJSONObject(0).keys(); // we retrieve the first object's
To parse the json file it is very much similar to parsing the xml
file .
first of all u need to create a json array which will captur all ur
elements for array posts and then make a json object for each element
of jsin array using the function jsonarray.getJSONObject(i) where i is
the index
I
You can use JSON Parser readily available for this purpose. Since
Android platform is compliant with standard J2SE JDK, you can use the
readily available open source JSON parsers.
You can try
http://www.json.org/java
Or
http://json-lib.sourceforge.net
I have used second one.
Thanks and Regards
Actually, Android omits a LOT of the standard J2SE JDK -- though
nothing that would impact a JSON parser.
But the usual JSON parser is built into Android. Just do new
org.json.JSONObject(json string)
On Apr 12, 2:33 am, vworld4u vworl...@gmail.com wrote:
You can use JSON Parser readily
Agree with the rest..use JSONObject/array. JAXB I believe can convert JSON
to objects as well.. but I may be wrong on that. I know that java/jersey
project with JAXB does handle the json or xml into object for me.. just not
sure if that is jaxb directly or if jersey is doing some of the work.
On
... and you can also [un]marshal it into java beans:
http://github.com/ko5tik/jsonserializer
--
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
By the way, that is invalid JSON.
On Apr 7, 5:05 am, Maxood maqs...@salsoft.net wrote:
I have the following JSON text that i need to parse to get pageName,
pagePic, post_id, etc. What is the required code?
pageInfo: {
pageName: abc
pagePic:http://profile.ak.fbcdn.net/object2/367/…}
posts:
Look into JSONObject and JSONArray.. Makes it real easy to parse JSON.
On Apr 7, 9:12 am, Eddie Ringle ed...@eringle.net wrote:
By the way, that is invalid JSON.
On Apr 7, 5:05 am, Maxood maqs...@salsoft.net wrote:
I have the following JSON text that i need to parse to get pageName,
11 matches
Mail list logo