lua-cjson icon indicating copy to clipboard operation
lua-cjson copied to clipboard

decode will not decode an encoded table

Open eladbs opened this issue 5 years ago • 1 comments

Hi, Using lua v5.1 and lua-cjson v2.1.0.6-1.

Why print(cjson.decode(cjson.encode({success = true}))) results in "" (an empty line) and not {success = true}? What am I missing?!

Thanks!

eladbs avatar Dec 31 '20 13:12 eladbs

try

print(cjson.encode(cjson.decode(cjson.encode({success = true}))))

rodriguez-facundo avatar Oct 13 '21 12:10 rodriguez-facundo