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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use (1 << 53) - 1
  • Loading branch information
ry committed Aug 31, 2022
commit 2f2d13502e3e9a5f659425aaadb69b87252c892e
4 changes: 2 additions & 2 deletions serde_v8/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ macro_rules! forward_to {
};
}

const MAX_SAFE_INTEGER: i64 = 9007199254740991;
const MIN_SAFE_INTEGER: i64 = -9007199254740991;
const MAX_SAFE_INTEGER: i64 = (1 << 53) - 1;
const MIN_SAFE_INTEGER: i64 = -MAX_SAFE_INTEGER;

impl<'a, 'b, 'c> ser::Serializer for Serializer<'a, 'b, 'c> {
type Ok = v8::Local<'a, v8::Value>;
Expand Down