File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
dotnet/src/webdriver/BiDi/Communication Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2424using System ;
2525using System . Collections . Concurrent ;
2626using System . Collections . Generic ;
27+ using System . Diagnostics . CodeAnalysis ;
2728using System . Linq ;
2829using System . Text . Json ;
2930using System . Text . Json . Serialization ;
@@ -110,6 +111,13 @@ internal Broker(BiDi bidi, ITransport transport)
110111 _jsonSerializerContext = jsonSerializerOptions ;
111112 }
112113
114+ [ RequiresUnreferencedCode ( "Uses reflection-based JSON serialization" ) ]
115+ [ RequiresDynamicCode ( "Uses reflection-based JSON serialization" ) ]
116+ public void EnableReflectionBasedJson ( )
117+ {
118+ _jsonSerializerContext . TypeInfoResolverChain . Add ( new DefaultJsonTypeInfoResolver ( ) ) ;
119+ }
120+
113121 public void ProvideCustomSerializationContext ( JsonSerializerContext extensionContext )
114122 {
115123 _jsonSerializerContext . TypeInfoResolverChain . Add ( extensionContext ) ;
You can’t perform that action at this time.
0 commit comments