|struct||The struct to encode as a string|
|boolean||Optional: Enables or disables formatting the string with linebreaks and indentation|
Converts a struct and its contents to a string, optionally with "pretty-print" to separate values by line with proper indenting.
Note that only single values, arrays, strings, and sub-structs are interpreted by this function. Other data structures, like
ds_grid, are stored by reference only and will be written as a numerical index rather than their actual contents. To avoid this behavior, first use the respective
ds_*_write function on these data structures so they will be included as strings which can be decoded later with