What is System.Text.Json equivalent for XmlElment(name, type)
I have the following class. public class Foo { [XmlElement("Bar", typeof(Bar))] [XmlElement("Pub", typeof(Pub))] public BaseBar Bar { get; set; } } I would like to move from XML serialization to JSON (System.Text.Json) serialization, what is the equivalent for the attribute…