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

fix #41: Large numbers serialized incorrectly #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aleksanderd
Copy link

No description provided.

@appgurueu
Copy link

Proper fix should be just using "%.17g".

@appgurueu
Copy link

Okay no, to support newer Lua versions and 64-bit integers, math.tointeger and %d should indeed be used; %g would have to be bumped to %.20g.

dtfiedler added a commit to dtfiedler/json.lua that referenced this pull request Nov 5, 2024
… decmials, return string value of integers

As mentioned in rxi#42 (comment) - Lua 5.3+ supports 64 bit integers. This change modifies the string encoding of numbers to align with those changes.
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

Successfully merging this pull request may close these issues.

2 participants