JSON help

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

JSON help

Postby coolalok » Wed Sep 09, 2009 5:23 pm

Hi guys , i am using JSON to send data to server and fetching response back and using it .
Now what i want to do ideally is create an object of a class whose members name is key and member value is value for a JSON object

class MyClass
string code;
string message;
public abc()
code = null;
message = null;
MyClass myClassObj = new MyClass();
myClassObj.a = "hello";
myClassObj.a = "hey";
JSONObject jObj = new JSONObject();

Some way to put the myClassObj in JSONObject and send it to server.

Now server gives response as say
On retreival i should be able to assign JSONObject to MyClass object and all values such as code , message should be automatically retrievable


I have seen some dot net examples whering serialization /deserialization has been done to objects . How can i do it here?
Here I come!!!
User avatar
Posts: 29
Joined: Tue Sep 01, 2009 7:35 pm
Location: Pune,India


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests