I want to have a property with type name in JSON when I serialize objects of certain types. I wrote a converter:
public class TypeInfoConverter : JsonConvert
var jsonSerializerSettings = new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All }; var json = JsonConvert.SerializeObject(instance, jsonSerializerSettings);
http://james.newtonking.com/json/help/index.html?topic=html/SerializationSettings.htm