Skip to content

Support Big Numbers #37

Description

@brimworks

Since all numbers are represented as double, larger numbers (like longs) get truncated. For example, the output of this code...

cjson.encode(cjson.decode("9007199254740992"))```

...is not the same as the input. This is needed since I need to sometimes parse the JSON output of APIs that I do not control and that use numbers that do not fit into doubles.

A proposed fix is in this pull request:

https://github.com/mpx/lua-cjson/pull/36

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions