File tree 1 file changed +8
-0
lines changed
dotnet/src/webdriver/BiDi/Communication 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 24
24
using System ;
25
25
using System . Collections . Concurrent ;
26
26
using System . Collections . Generic ;
27
+ using System . Diagnostics . CodeAnalysis ;
27
28
using System . Linq ;
28
29
using System . Text . Json ;
29
30
using System . Text . Json . Serialization ;
@@ -110,6 +111,13 @@ internal Broker(BiDi bidi, ITransport transport)
110
111
_jsonSerializerContext = jsonSerializerOptions ;
111
112
}
112
113
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
+
113
121
public void ProvideCustomSerializationContext ( JsonSerializerContext extensionContext )
114
122
{
115
123
_jsonSerializerContext . TypeInfoResolverChain . Add ( extensionContext ) ;
You can’t perform that action at this time.
0 commit comments