Write and read a json string and convert to internal data structure

I am looking to storage game levels ( level variables and a level 8x8 grid layout ) as a json string so I can;

Store game levels as json strings stored as a text file, which is read in and converted into app inventor data structures so the level can be played. An example ( shortened ) of a level is

{
"Level": 1,
"Target_Score": 5,
"Time_Before_Water_Release": 5,
"WaterStart": [
0
],
"initial_maze": [
[
{
"Base_Block": "topright_block.png",
"Angle": 90,
"WaterLevel": 0,
"WaterOutflow": [
-1,
-8,
9,
1
]
},
{
"Base_Block": "topright_block.png",
"Angle": 90,
"WaterLevel": 0,
"WaterOutflow": [
-1,
-8,
9,
1
]
}
],
[],
[],
[],
[],
[],
[],
[]
]
}

here the grid is rather than a 8 x 8 grid a series of 8 rows and the first row described to 2 columns.

My initial thoughts were to write each level as a line in a file, read file and for each line convert using either

json

the problem I see is only simple json is supported,ie a list or a dictionary but not a multi data type piece of json which has to be refactored ? Is there a extension or similar that supports this before I reinvent the wheel :frowning:

Use the dictionary blocks to build JSON strings
"make a dictionary"
image

so for , taking an example

{
"Level": 1,
"Target_Score": 5,
"Time_Before_Water_Release": 5,
"WaterStart": [
0
],
"initial_maze": [
[
{
"Base_Block": "topright_block.png",
"Angle": 90,
"WaterLevel": 0,
"WaterOutflow": [
-1,
-8,
1
]
}
]
}

where you have a series of key,value pairs followed by lists and then lists of lists

this is handled , ie a multi type data object ?

Yes you can build up a multi level structure using the make a dictionary, key:value or make a list blocks

e.g.

image

great, put together a demo and it works - thanks

json

giving

phone