複雜的JSON我有這個JSON
響應如何分析利用GSON和Java
{
"data":{
"last_name":"abcdef",
"email":"[email protected]",
"data1":{
"data2":{
"membership":"senior"
},
"Skills":[
{
"C":"GOOD",
"C++":"AVERAGE",
"JAVA":"GOOD",
"WEB":"GOOD"
}
]
}
}
}
現在我用下面的方法來通過GSON
public class ABC {
public String last_name;
public String email;
.
.
.
}
解析它,然後我做
讓利我們認爲JSON OBJECT是== responseObject
ABC obj = (ABC)responseObject // TypeCasting
obj.last_name
給我姓氏的結果 如何實現數組和其他data1字典?
參考這個http://www.mkyong.com/java/how -do-convert-java-object-to-from-json-format-gson-api/ – vinoth12594