public static void Main(string[] args) {
var n = System.Text.Json.JsonSerializer.Serialize(testA);
var m = System.Text.Json.JsonSerializer.Deserialize<TestB>(n);
Console.WriteLine(m.TY == null);
public string X { get; set; }
public string Y { get; set; }
public string Z { get; set; }
public TestY(string x, string y, string z)
public string X { get; init; }
public string Y { get; init; }
public string Z { get; init; }
public int A { get; set; }
public int B { get; set; }
public int C { get; set; }
public int D { get; set; }
public TestX TX { get; set; }
public TestB(int a, int b, int c, int d, TestY tY)
A = a; B = b; C = c; D = d;
public int A { get; init; }
public int B { get; init; }
public int C { get; init; }
public int D { get; init; }
public TestY TY { get; init; }