{
"status": "Success",
"message": "Contents retrieved successfully",
"name": {
"1": "God",
"2": "Goat"
},
"sites": {
"1": "google",
"2": "yahoo",
"3": "bing"
},
"places": [
"UK",
"AU",
"US"
],
"images": {
"1": {
"1x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png",
"2x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png"
},
"2": {
"1x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png",
"2x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png"
},
"3": {
"1x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png",
"2x": "http://3.bp.blogspot.com/-PPrUA_pcNyI/Udtx6v7MlvI/AAAAAAAADZA/6X2Qu-FcHtA/s320/Android+JSON+stream+data+parsing+example+using+Gson.png"
}
}
}
我的课
导入 java.util.Map;
public class Data {
String status;
String message;
Map<String, String> name;
Map<String, String> Sites;
@Override
public String toString() {
return "Data [status=" + status + ", message=" + message
+ ", name=" + name + ", Sites=" + Sites
+ "]";
}
}
此类在检索站点和名称时返回空值