[JsonConverter(typeof(JsonSubtypes), nameof(BaseClass.Type))]
[JsonSubtypes.KnownSubType(typeof(SubType1), BaseType.Type1)]
public class SubType1 : BaseClass
public static void Main()
{Type = BaseType.Type1, Name = "SubType", Id = "5"};
var serialized = JsonConvert.SerializeObject(sub);
Console.WriteLine(serialized);
var deserialized = JsonConvert.DeserializeObject<SubType1>(serialized);
Console.WriteLine(deserialized);