Hi
I have a client-side collection that can contain classes which descend from a parent. For instance I might have a class called fruit, and two subclasses apple and orange. In the client I have an object List<fruit> and it is filled with apples and oranges.
On the server I have no problem serializing a list containing only fruit objects, but as soon as an apple or orange is added to the list the deserialization fails. I assume its because the converter is trying to set a property on the fruit object which is only defined in apple or orange. Right now all of my Json objects are stripped of their type information. Is there some way to make it so that I can include type info on the client-side in the Json representation of my fruit objects and have the server-side deserialization use that typeinfo to instantiate the proper fruit instance before trying to add the descendant properties?
If so how do I get Json.Net to look for this type info and create the correct object?
Thanks, Derek