Overview
JSON Struct is a complete, cleanup-free replacement for GMS 2's built-in JSON functions. Encode and decode JSON as native structs and arrays, load and save them in one take, and even encrypt them!
Features
ds_map_destroy()
!ds_map_add_*()
or ds_list_mark_as*()
for nested entries!Documentation
See the Wiki section on the official GitHub repository.
Examples
Saving JSON data:
jsons_save("example.json", {
messages: ["Hello World!", "Goodbye World!"]
});
Loading JSON data:
global.messages = jsons_load("example.json");
Decoding JSON strings:
var json_str = @'{"messages":["Hello World!", "Goodbye World!"]}';
//...
var json_data = jsons_decode(json_str);
show_message(json_data.messages[0]); //Hello World!
End User Licence Agreement (EULA).
Initial release.