Add bigintconverter to serialize int64 and uint64 to string#13
Open
Add bigintconverter to serialize int64 and uint64 to string#13
Conversation
…rializer options handling
…JsonException on failure Agent-Logs-Url: https://github.com/Wish-Org/GraphQLSharp/sessions/32ed737e-ce79-41b5-9631-6df5fcb32431 Co-authored-by: matnun-br <185004289+matnun-br@users.noreply.github.com>
…re, and JsonException on failure" This reverts commit a749d31.
…ptions fields private
… UInt64ToStringConverter; update serializer options accordingly
There was a problem hiding this comment.
Pull request overview
Updates JSON serialization to support GraphQL “BigInt”-style handling by serializing long/ulong as strings and making serializer options configurable/cached.
Changes:
- Replaced static
Serializer.Options/OptionsIndentedwith a cachedGetOptions(indent, serializeInt64ToString)API. - Added
Int64ToStringConverter/UInt64ToStringConverterto serialize 64-bit integers as JSON strings (optionally). - Updated client + tests to use the new options API and added bigint serialization/deserialization tests; bumped package version.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| GraphQLSharp/Serialization/Serializer.cs | Introduces cached options factory and new flags for indentation and 64-bit integer string serialization. |
| GraphQLSharp/Serialization/BigIntConverter.cs | Adds converters to write long/ulong as JSON strings and read from either string/number. |
| GraphQLSharp/GraphQLSharp.csproj | Bumps package version to 2.21.0. |
| GraphQLSharp/Client/GraphQLClient.cs | Switches default request/response JSON options usage to Serializer.GetOptions(). |
| GraphQLSharp.Tests/SerializationTests.cs | Updates datetime tests to use GetOptions() and adds bigint tests. |
| GraphQLSharp.Tests/GraphQLClientTests.cs | Updates JsonElement deserialization to use Serializer.GetOptions(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…te serializer options handling
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
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.
No description provided.