add json parsing of lists and maps

This commit is contained in:
Felix Van der Jeugt 2022-11-08 23:31:00 +01:00
parent 7471093f67
commit 025c8125fa
No known key found for this signature in database
GPG key ID: 58B209295023754D
16 changed files with 210 additions and 20 deletions

9
jsontest/complex.json Normal file
View file

@ -0,0 +1,9 @@
{
"planets": [
{ "ship_count": 2, "x": -2.0, "y": 0.0, "owner": 1, "name": "your planet" },
{ "ship_count": 4, "x": 2.0, "y": 0.0, "owner": 2, "name": "enemy planet" },
{ "ship_count": 2, "x": 0.0, "y": 2.0, "owner": null, "name": "neutral planet" }
], "expeditions": [
{ "id": 169, "ship_count": 8, "origin": "your planet", "destination": "enemy planet", "owner": 1, "turns_remaining": 2 }
]
}

1
jsontest/float.json Normal file
View file

@ -0,0 +1 @@
1.231

1
jsontest/list.json Normal file
View file

@ -0,0 +1 @@
["asdf", 1, 2]

1
jsontest/null.json Normal file
View file

@ -0,0 +1 @@
null

1
jsontest/number.json Normal file
View file

@ -0,0 +1 @@
2

View file

@ -0,0 +1 @@
"asdf"