我有这个json数组:
[
{
"id":18,
"city":"??????",
"street":"??????? 1",
"zipcode":121209,
"state":"IL",
"lat":32.158138,
"lng":34.807838
},
{
"id":19,
"city":"??????",
"street":"??? ??? 1",
"zipcode":76812,
"state":"IL",
"lat":32.161041,
"lng":34.810410
}
]
Run Code Online (Sandbox Code Playgroud)
我有这个类来保存数据:
public class MapData {
private int id;
private String city;
private String street;
private String state;
private int zipcode;
private double lat;
private double lng;
public MapData(int id, String city, String street, String state,
int zipcode, double lat, double lng) {
this.id = id;
this.city = city;
this.street = street;
this.state = state;
this.zipcode = …Run Code Online (Sandbox Code Playgroud)