I want to serialize a derived class and send it to a web-api method. In my WebApiConfig.cs I have set
config.Formatters.JsonFormatter.SerializerSettings.TypeNameHandling = TypeNameHandling.Auto;
I have set the $type parameter in my JSON (or JavaScript which will be serialized to JSON) but the derived class still doesn't get deserialized correctly (always null).