Serializing an interface/abstract object using NewtonSoft.JSON
问题 One way of deserializing interface and abstract properties is a class is by setting TypeNameHandling to Auto during serialization and deserialization. However, when I try the same when serializing and deserializing an interface object directly, it does not work - interface ISample { string Key { get; set; } } class A : ISample { public string Key { get; set; } public A(string key) { this.Key = key; } } class B : ISample { public string Key { get; set; } public B(string key) { this.Key = key;