[dotnet] [bidi] Use JsonSerializerContext to be AOT friendly#15162
[dotnet] [bidi] Use JsonSerializerContext to be AOT friendly#15162nvborisenko merged 7 commits intoSeleniumHQ:trunkfrom
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.
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.