Why does System.Text Json Serialiser not serialise this generic property but Json.NET does?
问题 I have the following situation. I have simplified the problem into the following example, although my real situation is more complicated. System.Text.Json does not serialise the object fully but Newtonsoft Json.NET does. Suppose I have the following class structure. public class A { public string AProperty { get; set; } = "A"; } public class A<T> : A where T : class, new() { public T TObject { get; set; } = new T(); } public class B { public string BProperty { get; set; } = "B"; } public