So I'm currently building a game, and I'm trying to parse this in the game. Now this is how a part of it looks like:
{
"CircuitList": [
{
"name": "GP SILVERSTONE",
"location": "ENGLAND",
"laps": 57,
"Parts":
[
{
"1":{
"type": "straight",
"length": 800
},
"2": {
"type": "sharpturn",
"length": 200
},
Now this is followed by more parts. Right now, I've parsed the json file, and used
JSONArray Silverstoneparts = (JSONArray) jsonObject.get("Parts");
to create a array with all the parts. But I don't know how to read out the types and lengths, so if there is anyone willing to help, like push me gently into the right direction, it would be highly appreciated :)