Hello !
I was wondering if anybody could help me out in the making of such a json :
{ "c2dictionary": true, "data": { "type": "position_update", "content": { "player1":{ "x":1, "y":0.5 }, "player2":{ "x":0, "y":0.5 }, "player3":{ "x":1, "y":0.7 } } } }[/code:1escday7] I have been trying to reproduce it without success and can't really change the structure of the script receiving it. I made a dictionary and sent its content "asjson". I really don't know how to make it more complex to fit the needs . If anybody could help, I would love him forever Cheers !
maybe just 2values inside the same key... is it even possible ?
When I am building complex JSON in C2, I build it in the C2 object that I want to use first, then I output the .asJSON to a TextBox (so I can copy/paste it elsewhere), and only then do I tweak the raw JSON and build programs to build it dynamically.
So make the most complex dictionary object that you can in Construct first and then output it to asJSON, so you can see the schema that Construct uses.
Or better yet, switch to rexrainbow 's Hash plugin, and then you can use JSON like:
https://www.stormforgedproductions.com/ ... ?op=galaxy or
https://www.stormforgedproductions.com/ ... =structure
Hi ! thanks for reply I finaly found how to do it by using the json plug-in, not the one by rexrainbow... but the other one (seemed more understandable to me ).
Now I can do more complexe json with ease and grace ;D !
Develop games in your browser. Powerful, performant & highly capable.
?
Yup ! this one ! Thanks for retrieving the link !