我有这个json,我想用线串类型恢复第二个坐标。
{
"type": "FeatureCollection","features": [
{
"type": "Feature","geometry": {
"type": "Point","coordinates": [
2.1163,48.8288
]
},"properties": {
"address": "-","datetime": "2019-11-12 12:47:38"
}
},{
"type": "Feature","coordinates": [
2.1085,48.8379
]
},"datetime": "2019-11-12 12:53:11"
}
},"geometry": {
"type": "Linestring","coordinates": [
[
2.1163,48.8288
],[
2.1165,48.8289
],[
2.1175,[
2.1136,48.8309
],[
2.1117,48.837
],[
2.1052,48.8366
],[
2.1068,48.8376
],[
2.1085,48.8379
]
]
}
}
]
}
我的模特:
公共类几何{
public static final String SERIALIZED_TYPE = "type";
@SerializedName(SERIALIZED_TYPE)
public String type;
public static final String SERIALIZED_COORDINATE = "coordinates";
@SerializedName(SERIALIZED_COORDINATE)
public double[] coordinatesPoint;
@Override
public String toString() {
return "Geometry{" +
"type='" + type + '\'' +
",coordinatesPoint=" + Arrays.toString(coordinatesPoint) +
'}';
}
}
我知道他想要一个双重数组,但我不知道如何解决它,谢谢您对我的帮助或启发。