json
Functions
parse
Argument | Type | Required |
---|---|---|
data | string | + |
returns | table |
local parsed = json.parse("{\"hello\": \"world\"}");
print(parsed["hello"]) -- prints: 'world'
stringify
Argument | Type | Required |
---|---|---|
data | table | + |
returns | string |
local str = json.stringify({hello = "world"});
print(str) -- prints: '{"hello":"world"}'