Serialize derived classes ignores derived class properties

Oct 19, 2012 at 2:06 PM
Edited Oct 19, 2012 at 2:06 PM

I've got a DerivedClass being inherited from a BaseClass.

I've got a List<BaseClass> that contains items of type BaseClass as well as type DerivedClass.  If I call "JsonConvert.SerializeObject(myList)" I only get back properties matching what's in BaseClass and everything in the DerivedClass is ignored.  

I tried using "TypeNameHandling.All" as a setting, and it gets the name correct in the serialized string, but the properties from the derived class are still missing. 

Is there a way to accomplish this?