Thanks mark for your quick response. Regarding the get and put methods , i
am using them currently . But it would hv been great if i could read the
entire response in an object like the third party  support .. Anyways
nothing comes easily. I will have a look at the Jettison driver and post the
solution when i have it.
Thanks and Regards,
Alok.

On Wed, Sep 9, 2009 at 10:01 PM, Mark Murphy <[email protected]>wrote:

>
> Alok wrote:
> >       Some way to put the myClassObj in JSONObject and send it to server.
>
> JSON works with arrays and "objects" (roughly a HashMap), not custom
> classes.
>
> So, if you want to put stuff in a JSONObject, you have to do it yourself
> via put() method calls.
>
> >       On retreival i should be able to assign JSONObject to MyClass
> object
> > and all values such as code , message should be automatically
> > retrievable
>
> Use get() on the JSONObject.
>
> > I have seen some dot net examples whering serialization /
> > deserialization has been done to objects . How can i do it here?
>
> This has nothing to do with Android and everything to do with the
> JSON.org third-party library integrated in by Android.
>
> A quick Google search for:
>
> java jsonobject
>
> turned up:
>
> http://java-x.blogspot.com/2007/04/using-json-from-java.html
>
> http://stackoverflow.com/questions/944285/how-to-create-a-json-object-in-action-class-of-java
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coders' Guide to *Advanced* Android Development_ In Print!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to