Is it possible to specify that I always want type-information in the json object when serializing a property in an class? (Ideally with Newtonsoft). I'm thinking something like this:
public abstract class Value {...}
public class BigValue : Value {...}
public class SmallValue : Value {...}
public class ValueContainer
{
[JsonSetting(TypenameHandling = TypenameHandling.All)] // <--- Something like this?
public Value TheValue { get; set; }
}
I am aware that I could specify this behavior when doing the parsing with a custom converter. But I want to include the typeinformation every time objects of this type is serialized, without manually having to specify which serialization options to use.