Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Add parseJsonWithBigInts helper #3193

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

lorisleiva
Copy link
Contributor

@lorisleiva lorisleiva commented Sep 2, 2024

This PR adds a new parseJsonWithBigInts helper function that parses any JSON string whilst parsing any integer within the JSON string into a bigint without loosing precision even when said integer goes above Number.MAX_SAFE_INTEGER.

This will be used — in a subsequent PR — to create a new Solana-RPC-specific HTTP transport that prevents loss of precision for large integers.

Copy link

changeset-bot bot commented Sep 2, 2024

⚠️ No Changeset found

Latest commit: 207e5a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from dd565d7 to 7b5a5cb Compare September 2, 2024 14:51
@lorisleiva lorisleiva changed the title Add jsonParseWithBigInts helper Add parseJsonWithBigInts helper Sep 2, 2024
@lorisleiva lorisleiva marked this pull request as ready for review September 2, 2024 14:52
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from 7b5a5cb to 0369450 Compare September 2, 2024 15:43
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from 0369450 to b3e4ac7 Compare September 2, 2024 15:47
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from b3e4ac7 to cc8c5d6 Compare September 3, 2024 21:25
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from cc8c5d6 to f2ea496 Compare September 3, 2024 21:35
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from f2ea496 to eedbefd Compare September 3, 2024 22:11
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from eedbefd to 6a38604 Compare September 5, 2024 09:22
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from 6a38604 to b935286 Compare September 6, 2024 11:49
Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

Added via Giphy

Copy link
Contributor Author

lorisleiva commented Sep 11, 2024

Merge activity

  • Sep 11, 4:12 AM EDT: @lorisleiva started a stack merge that includes this pull request via Graphite.
  • Sep 11, 4:14 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 11, 4:15 AM EDT: @lorisleiva merged this pull request with Graphite.

@lorisleiva lorisleiva changed the base branch from loris/from-to-json to graphite-base/3193 September 11, 2024 08:12
@lorisleiva lorisleiva changed the base branch from graphite-base/3193 to master September 11, 2024 08:13
@lorisleiva lorisleiva force-pushed the loris/json-parse-with-bigints branch from c651c96 to 207e5a5 Compare September 11, 2024 08:13
@lorisleiva lorisleiva merged commit 06aaffb into master Sep 11, 2024
7 checks passed
@lorisleiva lorisleiva deleted the loris/json-parse-with-bigints branch September 11, 2024 08:15
Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants