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
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?