How to create JSON arrays in Java
•
Java
I have a JSON structure as follows How do I create this array structure programmatically?
JSON structure:
{
"Employee":
[
{
"EmP325235":
{
"Name":"Rekha_S","firstName":"Rekha","phoneWork":"788908909","lastName":"S","namePrefix":"Miss","phoneMobile":"3347687878","phoneHome":"5768900909","Email":""
},"Em252555":
{
"Name":"Roopa_N","firstName":"Roopa","phoneWork":"0471245367","lastName":"N","namePrefix":"","phoneMobile":"","phoneHome":"","Email":""
}
}
],"User_Details":
{
"USER_ID":"7890","Number":"8585858585","Password":"Passwordsgs"
}
}
Solution
This should provide the example you are looking for
http://code.google.com/p/json-simple/wiki/DecodingExamples
http://code.google.com/p/json-simple/wiki/EncodingExamples
json-simple home
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
