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

Unable to parse JSON with -0.8999999999999999 #92

Open
vladaman opened this issue Apr 18, 2024 · 1 comment
Open

Unable to parse JSON with -0.8999999999999999 #92

vladaman opened this issue Apr 18, 2024 · 1 comment

Comments

@vladaman
Copy link

Following code will throw an error:

let str = "{\"x\":-0.8999999999999999}";
console.log(JSONbig.parse(str));
/project/node_modules/json-bigint/lib/parse.js:215
            ? BigInt(string)
              ^

SyntaxError: Cannot convert 0.8999999999999999 to a BigInt
    at BigInt (<anonymous>)
    at number (/project/node_modules/json-bigint/lib/parse.js:215:15)
@mois-ilya
Copy link

Duplicate #88

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