Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decode will not decode an encoded table #72

Open
eladbs opened this issue Dec 31, 2020 · 1 comment
Open

decode will not decode an encoded table #72

eladbs opened this issue Dec 31, 2020 · 1 comment

Comments

@eladbs
Copy link

eladbs commented Dec 31, 2020

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 eladbs changed the title decode will decode an encoded table decode will not decode an encoded table Dec 31, 2020
@rodriguez-facundo
Copy link

try

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

rzanol pushed a commit to rzanol/lua-cjson that referenced this issue Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants