I have a JSON structure as given below. How can I create this Array structure programmatically?
JSON srtucture:
{
\"Employee\":
XStream provides a very convenient way to transform JSON to JAVA and back. Its annotation based and does the conversion job pretty well. Check XStream
I'd probably use the GSON library which will marshall Java objects.
There's an array example to get you started, as well as a ton of others in the user guide.
use the following link the complete structure of the JSON explained.
http://json.org/java/