-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] [bidi] Use JsonSerializerContext to be AOT friendly #15162
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Looks nice! I ran into the System.Runtime.CompilerServices.Unsafe
issue earlier, happy to see a fix for it here.
User description
Description
Introduced
BiDiSerializerContext
for json serialization.Motivation and Context
Contributes to #14480
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Introduced
BiDiSerializerContext
for JSON serialization.Replaced
JsonSerializerOptions
withJsonSerializerContext
across BiDi components.Added a new
BiDiSerializerContext
class with extensive type mappings.Updated transport interfaces and implementations to use
JsonSerializerContext
.Changes walkthrough 📝
Broker.cs
Refactor Broker to use BiDiSerializerContext
dotnet/src/webdriver/BiDi/Communication/Broker.cs
JsonSerializerOptions
withBiDiSerializerContext
.BiDiSerializerContext
.BiDiSerializerContext.cs
Introduce BiDiSerializerContext for JSON serialization
dotnet/src/webdriver/BiDi/Communication/Json/BiDiSerializerContext.cs
BiDiSerializerContext
class.JsonSerializable
attributes for type definitions.ITransport.cs
Update ITransport interface for JsonSerializerContext
dotnet/src/webdriver/BiDi/Communication/Transport/ITransport.cs
ITransport
interface to useJsonSerializerContext
.JsonSerializerOptions
in method signatures.WebSocketTransport.cs
Refactor WebSocketTransport for JsonSerializerContext
dotnet/src/webdriver/BiDi/Communication/Transport/WebSocketTransport.cs
WebSocketTransport
to useJsonSerializerContext
.