The copy
method returns a copy of the JSON object. Modifying the copy does not modify the original object.
copy()
(LuaJsonObject). A copy of the object.
local myJsonObject = LuaJsonObject:new( { product="IDOL" , version=11 } ) local anotherJsonObject = myJsonObject:copy() print (anotherJsonObject:string()) -- {"product":"IDOL","version":11}
|