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

feat(serde_v8): Serialize integers as BigInt #15692

Merged
merged 6 commits into from
Sep 1, 2022

Conversation

Suficio
Copy link
Contributor

@Suficio Suficio commented Aug 30, 2022

Serialize integers as v8::BigInt when outside of the safe integer bounds for v8::Number.

Contrary to previous approaches this doesn't always return v8::BigInt therefore shouldn't be as serious of a breaking change.

Was getting malformed data when serializing arbitrary objects to Deno and deserializing back to Rust.

Closes: #12679

@CLAassistant
Copy link

CLAassistant commented Aug 30, 2022

CLA assistant check
All committers have signed the CLA.

@ry ry force-pushed the serialize-integers-as-big-int branch from 2a141f9 to 2f2d135 Compare August 31, 2022 04:48
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Suficio, good fix!

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@littledivy littledivy merged commit 37b32fa into denoland:main Sep 1, 2022
hardfist pushed a commit to hardfist/deno that referenced this pull request Aug 7, 2024
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.

Lost precision for large 64 bit numbers
5 participants