[json-lib-user] Need some help in understanding how it json converts the HashMap
Brought to you by:
aalmiray
From: Vinod E. <vel...@ap...> - 2010-04-06 01:23:46
|
Hello folks, This is my first time using json. Let me explain to you briefly as what i am doing and then what i want. Basically we have client server model. server is fully in java and right now the client is also in java. But we want to develop the client in C#. We use http protocol to communicate and use java serialization. Earlier we used to use XML but due to lot of processing at the client side we are using serialization mechanism. So our who object that we transform is just a HashMap. Since we want to build C# client also i want to use json to transform the map and then retrieve back in C#. However the HashMap is not just name value pairs. It also has POJO objects in them. So my question is how can i retrieve them back in the same object. Right now if i try to do it JSONObject.toBean(jsonObj, HashMap.class) is giving me DynaBean and not the POJO object. Please let me know how i can resolve this. thanks in advance, |