Skip to content
Angelo Geels edited this page May 3, 2015 · 1 revision

Encodes or decodes json data.

Functions

  • json:decode(string) Decode the given json string to an object.
  • json:encode(object) Encode the given object to a json string.

Permissions

This library does not require any permissions.

Example

local obj = json:decode('{"foo":123,"bar":"foobar"}')
print(obj['foo']) -- 123
print(obj['bar']) -- foobar
Clone this wiki locally