json
Stores and manipulates a JSON object.
Methods
Gets the JSON object. Alternatively, you can use the Lua tostring() function
returns: json
Loads a JSON object from a string
Properties
[akey] | variant | Gets or sets the value of a key |
Usage
j = scl.json:new()
j['name.first'] = 'Carla'
j['name.last'] = 'Coe'
j.year = 2013
print(tostring(j))
--[[
this will print:
{
"year": 2013,
"name": {
"first": "Carla",
"last": "Coe"
}
}
]]
j:release()