this is my short load code that works in html5
if (!file_exists(working_directory + "profiles.json")){
var file = file_text_open_write(working_directory+"profiles.json");
profiles = ds_map_create();
file_text_write_string(file, json_encode(profiles));
file_text_close(file);
}else{
var file = file_text_open_read(working_directory+"profiles.json");
var content = file_text_read_string(file);
file_text_close(file);
profiles = json_decode(content);
}