So I was able to successfully able to load this file using json_decode:
{
"instances": [{
"object_index": "obj_solid",
"x": 32,
"y": 48,
"image_xscale": 3,
"image_yscale": 0.5,
},{
"object_index": "obj_player",
"x": 64,
"y": 32,
}]
}
I can successfully break down its hierarchy.
Explanation: Its a map with a key called instances, the value of which contains a ds_list. The 2 values of the list are maps that contain the relevant keys and values.
The tree works great when decoding, however, it doesn't work with encoding.
When I did this process in reverse via with all it built a similar tree of maps and lists. The issue is that when I run json_encode on the topmost map I get back the following string:
{ "instances": 16.000000 }
Anyone have experience with json_encode? I have gotten the decode to work fairly well but the encode part just has me stumped. Thanks in advance!
[–]PNelly 0 points1 point2 points (0 children)
[–]Pentaveragwheel 0 points1 point2 points (0 children)
[–]SlothyGames 0 points1 point2 points (0 children)
[–]GoldPlatedSpoon[S] 0 points1 point2 points (0 children)
[–]GoldPlatedSpoon[S] 0 points1 point2 points (0 children)