File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/Microsoft.OpenApi/Reader/ParseNodes Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 88using System . Linq ;
99using System . Text . Json ;
1010using System . Text . Json . Nodes ;
11+ using System . Text . Json . Serialization ;
1112using Microsoft . OpenApi . Any ;
1213using Microsoft . OpenApi . Exceptions ;
1314using Microsoft . OpenApi . Interfaces ;
@@ -114,7 +115,7 @@ IEnumerator IEnumerable.GetEnumerator()
114115
115116 public override string GetRaw ( )
116117 {
117- var x = JsonSerializer . Serialize ( _node ) ;
118+ var x = JsonSerializer . Serialize ( _node , SourceGenerationContext . Default . JsonObject ) ;
118119 return x ;
119120 }
120121
@@ -176,4 +177,7 @@ public override JsonNode CreateAny()
176177 return _node ;
177178 }
178179 }
180+
181+ [ JsonSerializable ( typeof ( JsonObject ) ) ]
182+ internal partial class SourceGenerationContext : JsonSerializerContext { }
179183}
You can’t perform that action at this time.
0 commit comments