You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsonSerializerContext) as {(isDerivedClass?"T":typeName)}{(isValueType?"?":"")};
89
103
}}
90
104
91
105
{"Deserializes a JSON string using the provided JsonSerializerOptions.".ToXmlDocumentationSummary(level:8)}
92
106
#if NET8_0_OR_GREATER
93
107
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode(""JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved."")]
94
108
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode(""JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications."")]
95
109
#endif
96
-
public static {typeName}? FromJson(
110
+
public static {typeName}? FromJson{(isDerivedClass?"<T>":string.Empty)}(
jsonSerializerContext).ConfigureAwait(false)) as {(isDerivedClass?"T":typeName)}{(isValueType?"?":"")};
116
132
}}
117
133
118
134
/// <summary>
@@ -122,17 +138,18 @@ public string ToJson(
122
138
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode(""JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved."")]
123
139
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode(""JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications."")]
124
140
#endif
125
-
public static global::System.Threading.Tasks.ValueTask<{typeName}?> FromJsonStreamAsync(
141
+
public static global::System.Threading.Tasks.ValueTask<{typeName}?> FromJsonStreamAsync{(isDerivedClass?"<T>":string.Empty)}(
modelData.Properties.Where(static x =>x.IsRequired).Select(x =>$@"
126
+
properties.Where(static x =>x.IsRequired).Select(x =>$@"
114
127
{x.Type.CSharpType}{x.ParameterName}").Concat(
115
-
modelData.Properties.Where(static x =>xis{IsRequired:false,IsDeprecated:false}&&(x.Type.CSharpTypeNullability||string.IsNullOrWhiteSpace(x.DefaultValue))).Select(x =>$@"
128
+
properties.Where(static x =>xis{IsRequired:false,IsDeprecated:false}&&(x.Type.CSharpTypeNullability||string.IsNullOrWhiteSpace(x.DefaultValue))).Select(x =>$@"
116
129
{x.Type.CSharpType}{x.ParameterName}")).Concat(
117
-
modelData.Properties.Where(static x =>xis{IsRequired:false,IsDeprecated:false}&&!(x.Type.CSharpTypeNullability||string.IsNullOrWhiteSpace(x.DefaultValue))).Select(x =>$@"
130
+
properties.Where(static x =>xis{IsRequired:false,IsDeprecated:false}&&!(x.Type.CSharpTypeNullability||string.IsNullOrWhiteSpace(x.DefaultValue))).Select(x =>$@"
Copy file name to clipboardExpand all lines: src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,5 @@ public sealed partial class ChatCompletionVllmStreamingMessageMeta
0 commit comments