clear
The clear
method clears the object, so that it contains no attributes (name/value pairs).
Syntax
clear()
Example
local myJsonObject = LuaJsonObject:new( { product="IDOL" , version=11 } ) myJsonObject:clear() print (myJsonObject:string()) -- {}