json

Stores and manipulates a JSON object.

Methods

getjson()

Gets the JSON object. Alternatively, you can use the Lua tostring() function
returns: json

load(s)

Loads a JSON object from a string

Properties

[akey]variantGets 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()