public static void Main()
Console.WriteLine(DeserializeAnonymousType("null", new
Console.WriteLine(x.Message);
Console.WriteLine(DeserializeAnonymousType("{}", new
Console.WriteLine(x.Message);
Console.WriteLine(DeserializeAnonymousType("{ \"a \": \"a\" }", new
Console.WriteLine(x.Message);
Console.WriteLine(DeserializeAnonymousType("{ \"b\": 1 }", new
Console.WriteLine(x.Message);
Console.WriteLine(DeserializeAnonymousType("{ \"a \": \"a\", \"b\": 1 }", new
Console.WriteLine(x.Message);
public static T? DeserializeAnonymousType<T>(string json, T prototype, JsonSerializerOptions? options = default) => JsonSerializer.Deserialize<T>(json, options);