add json parsing of lists and maps
This commit is contained in:
parent
7471093f67
commit
025c8125fa
16 changed files with 210 additions and 20 deletions
9
jsontest/complex.json
Normal file
9
jsontest/complex.json
Normal 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
1
jsontest/float.json
Normal file
|
@ -0,0 +1 @@
|
|||
1.231
|
1
jsontest/list.json
Normal file
1
jsontest/list.json
Normal file
|
@ -0,0 +1 @@
|
|||
["asdf", 1, 2]
|
1
jsontest/null.json
Normal file
1
jsontest/null.json
Normal file
|
@ -0,0 +1 @@
|
|||
null
|
1
jsontest/number.json
Normal file
1
jsontest/number.json
Normal file
|
@ -0,0 +1 @@
|
|||
2
|
1
jsontest/simplestring.json
Normal file
1
jsontest/simplestring.json
Normal file
|
@ -0,0 +1 @@
|
|||
"asdf"
|
Loading…
Add table
Add a link
Reference in a new issue