Skip to content

decode will not decode an encoded table  #72

Open

Description

@eladbs

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!

Activity

  1. changed the title [-]decode will decode an encoded table[/-] [+]decode will not decode an encoded table [/+] on Dec 31, 2020
  2. rodriguez-facundo commented on Oct 13, 2021

    @rodriguez-facundo

    try

    print(cjson.encode(cjson.decode(cjson.encode({success = true}))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions