The static global JSON class provides the ability to encode/decode data into JSON strings. This is largely used by the onSave() event function, but has other potential applications as well. The JSON class can be used on any String, Int, Float or Table. You call these functions like this:
This class does not work with Object references. Use the Object's GUID instead.
Value obtained from the encoded string. Can return a number, string or Table.
coded = JSON.encode("Test") print(coded) --Prints "Test" decoded = JSON.decode(coded) print(decoded) --Prints Test
Encodes data from a number, string or Table into a JSON string.
Encodes data from a number, string or Table into a JSON string. This version is slightly less efficient but is easier to read.