I am facing a problem creating a Json which is actually a complex one and i need to create it through HashMap only..I was actually looking for some recursive function that could be a best solution to my problem.
JSON i need to create looks like..
{"pkt":{
"data2":{"z":"3", "y":"2", "x":"1"},
"data3":{"n":"3", "l":"1", "m":"2"},
"mid":"1328779096525",
"data1":{"b":"2", "c":"3", "a":"1"},
"msg":"10012"
}
}
any ideas??
We’re using GSON for our object/JSON conversions. Here’s a link for more info: GSON