fix: use json-with-bigint instead of built-in JSON methods in order to properly support int64's#798
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
Initialize text variable for JSON response handling.
|
Unfortunately json() doesn't support bigint yet either (see whatwg/fetch#104): new Response('{"id":3804004623172239366}')).json().then(({id}) => console.log(id))
// 3804004623172239400So in the meantime something like json-bigint will probably be needed edit: json-bigint is just an example, there are other options. it's the most popular, but appears unmaintained. so it would be good to look at other options, e.g. https://github.com/Ivan-Korolenko/json-with-bigint or https://github.com/josdejong/lossless-json |
json-with-bigint instead of built-in JSON.parse() in order to properly support int64's
|
I made the changes necessary, this should in theory work |
jenseng
left a comment
There was a problem hiding this comment.
looks great, just one suggestion (though it could come as a separate PR)
|
also the PR summary needs a tweak since it still says |
json-with-bigint instead of built-in JSON.parse() in order to properly support int64'sjson-with-bigint instead of built-in JSON methods in order to properly support int64's
|
🎉 This PR is included in version 10.0.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #797
Before the change?
JSON.parse()andJSON.stringify()which cannot handle BigIntAfter the change?
json-with-bigintpackagePull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!