CC: Tweaked

CC: Tweaked

57M Downloads

textutils.unserialiseJSON empty arrays

ChickChicky opened this issue ยท 1 comments

commented

There should be an option to control whether empty arrays should be given the value empty_json_array or just an empty lua table.

Currently, when loading an empty JSON array and attempting to modify it, it directly modifies the textutils.empty_json_array which can cause a lot of trouble when the user isn't aware of it.
Adding a new parameter for textutils.serialiseJSON could be a simple solution that could be easily implemented.

commented

We have parse_null for json_null, so should be easy to do null as well if someone wants to have a crack at this.