How to write to json file?

Hi folks!

I am using json for loading data from web, that’s ok; as I can save and load data using STORAGE > write and read… that’s no problem.

My doubt is about to write a value to a json file, the same json file I am using for loading some data to a html5 game. Is there a way to write this “value”, from a variable to this json file( the same I am using to load some data )?

Thanks! And… sorry( maybe it’s a stupid question ).

JSON is decoded to a structure variable in GDevelop. So, just put the content or your variable inside that structure and then convert back the struction to JSON (done with a string expression).

EDIT : There is a little bug with JSON on GDevelop 3.6.78, my advice, download GD 3.6.79 (not officially released but ready to be released) : github.com/4ian/GD/releases

Thanks Victor! I’ll try it.