0
如何在Java中使用JSONObject
重新創建以下JSON對象?如何使用JSONObject創建JSON對象?
{
"RequestorId":121,
"Groups":[
{
"GroupID":1,
"GroupName":"xyz",
"ContentGroup":"abc",
"Regions":"india",
"MarketsCovered":"all",
"Users":[
{
"UserId":101,
"FirstName":"aaa",
"LastName":"yyy",
"Work_Location":"blore",
"CurrentRole":"ccc",
"LanguageSkills":"english"
},
{
"UserId":102,
"FirstName":"bbb",
"LastName":"vvv",
"Work_Location":"blore",
"CurrentRole":"ttt",
"LanguageSkills":"urdu"
}
]
},
{
"GroupID":2,
"GroupName":"yyy",
"ContentGroup":"bca",
"Regions":"india",
"MarketsCovered":"kkk",
"Users":[
{
"UserId":108,
"FirstName":"hhh",
"LastName":"jjj",
"Work_Location":"blore",
"CurrentRole":"ggg",
"LanguageSkills":"english"
},
{
"UserId":333,
"FirstName":"rrr",
"LastName":"eee",
"Work_Location":"mandya",
"CurrentRole":"ddd",
"LanguageSkills":"english"
}
]
}
]
}
這可能幫助:http://stackoverflow.com/questions/1957406/generate-java-class-from-json – ry8806