I'm trying to parse a json file which is this :
{
"number": 123,
"contract_name" : "London",
"name": "station",
"address": "address",
"position": {
"lat": 48.862993,
"lng": 2.344294
},
"banking": true,
"bonus": false,
"last_update": <timestamp>
}
this is what i've managed to do
s.setName(stationJson.optString("name"));
s.setTimestamp(stationJson.optString("last_update"));
s.setNumber(stationJson.optInt("number"));
s.setBonus(stationJson.optInt("bonus"));
s.setBank(stationJson.optInt("banking"));
s.setPosition(stationJson.getJSONObject("position"));
s.setLatitude(stationJson.optDouble("lat"));
s.setLongitude(stationJson.optDouble("lng"));
The problem is about the lng and lat.
Anyone have a idea how about how to resolve this?