Goonstation 13 - Modules - TypesProc Details

/plain_data

Data type for storing just data, without any procs or other fanciness. Meant to be used instead of deeply nested lists for e.g. TGUI ui_data.

Subtype this type and declare vars on the subtype. By contract all vars on the subtype must be either plain_data or a list or some primitive type (number, text, null).

Procs

to_jsonReturns a json string with all the data in this plain_data.
to_listReturns a list with all the data in this plain_data. The list is normalized, i.e. all plain_data values are converted to lists, recursively.

Proc Details

to_json

Returns a json string with all the data in this plain_data.

to_list

Returns a list with all the data in this plain_data. The list is normalized, i.e. all plain_data values are converted to lists, recursively.