-
Notifications
You must be signed in to change notification settings - Fork 23
Add utility to support json stringify/parse with JSONBigInt #56
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bhufmann
added a commit
to bhufmann/vscode-trace-extension
that referenced
this pull request
Mar 30, 2022
TODO: JSONBig.parse() create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use tsp-typescript-client's normalizer to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Signed-off-by: Bernd Hufmann <[email protected]>
bd42d06 to
75845a9
Compare
bhufmann
added a commit
to bhufmann/vscode-trace-extension
that referenced
this pull request
Sep 14, 2022
TODO: JSONBig.parse() doesn't create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use the normalizer of the tsp-typescript-client to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Contributes to fixing eclipse-cdt-cloud#35 Signed-off-by: Bernd Hufmann <[email protected]>
bhufmann
added a commit
to bhufmann/vscode-trace-extension
that referenced
this pull request
Sep 15, 2022
TODO: JSONBig.parse() doesn't create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use the normalizer of the tsp-typescript-client to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Contributes to fixing eclipse-cdt-cloud#35 Signed-off-by: Bernd Hufmann <[email protected]>
bhufmann
added a commit
to bhufmann/vscode-trace-extension
that referenced
this pull request
Sep 16, 2022
TODO: JSONBig.parse() doesn't create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use the normalizer of the tsp-typescript-client to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Contributes to fixing eclipse-cdt-cloud#35 Signed-off-by: Bernd Hufmann <[email protected]>
bhufmann
added a commit
to bhufmann/vscode-trace-extension
that referenced
this pull request
Sep 22, 2022
TODO: JSONBig.parse() doesn't create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use the normalizer of the tsp-typescript-client to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Contributes to fixing eclipse-cdt-cloud#35 Signed-off-by: Bernd Hufmann <[email protected]>
bhufmann
added a commit
to eclipse-cdt-cloud/vscode-trace-extension
that referenced
this pull request
Sep 23, 2022
TODO: JSONBig.parse() doesn't create bigint if numbers are small. This has to be addressed when deserializing messages. Re-use the normalizer of the tsp-typescript-client to do that. The following branch in the tps-typescript-client is introducing an utility class and, if accepted, it can be used to solve the deserialization issue: eclipse-cdt-cloud/tsp-typescript-client#56 Contributes to fixing #35 Signed-off-by: Bernd Hufmann <[email protected]>
75845a9 to
e611c16
Compare
868448c to
238dfa3
Compare
238dfa3 to
b74e11b
Compare
b74e11b to
bf474fe
Compare
58fcbda to
fe3ba59
Compare
fixes eclipse-cdt-cloud#57 Example Usages: // Usage with normalizer import { Experiment } from 'tsp-typescript-client/lib/models/experiment'; let input = JSONBigUtils.stringify(experiment); let output: Experiment = JSONBigUtils.parse(input, Experiment); // Usage no normalizer input = JSONBigUtils.stringify(inputObj); output = JSONBigUtils.parse<string>(input); input = JSONBigUtils.stringify(BigInt("1234567890123456789")); output = JSONBigUtils.parse<bigint>(bigIntInput); Signed-off-by: Bernd Hufmann <[email protected]>
fe3ba59 to
e8d6080
Compare
1 task
MatthewKhouzam
approved these changes
Feb 28, 2025
MatthewKhouzam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Add utility to support json stringify/parse with JSONBigInt.
Example Usages:
fixes #57
How to test
Unit tests including new tests for utility successful.
Follow-ups
N/A
Review checklist
Signed-off-by: Bernd Hufmann [email protected]