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