Skip to content

Support Big Numbers #37

Open
Open
@brimworks

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions