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

The 0 at the end will be ignored #87

Open
qishibo opened this issue Jul 28, 2023 · 1 comment
Open

The 0 at the end will be ignored #87

qishibo opened this issue Jul 28, 2023 · 1 comment

Comments

@qishibo
Copy link

qishibo commented Jul 28, 2023

The 0 at the end will be ignored, resulting in the float becoming to an int, is this as expected?

JSONbig.parse('{"aa":1.01}') => {aa:1.01}

but JSONbig.parse('{"aa":1.00}')=> {aa:1}

@edgarsi
Copy link

edgarsi commented Sep 13, 2023

Javascript does not have different types for ints and floats. Internally, it stores it all as IEEE 754 doubles.

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