util.json

Sometimes you need to deal with JSON objects. This library can serialize Lua objects to JSON and parse them back.

Reference

encode(data)

Returns a string representing the given data (usually, but not always, a table).

decode(string)

Returns the original data, given a string returned by encode(data).