mpx / lua-cjson

Lua CJSON is a fast JSON encoding/parsing module for Lua

Home Page:https://kyne.au/~mark/software/lua-cjson.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

decode will not decode an encoded table

eladbs opened this issue · 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!

commented

try

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