I have two applications which are communicating via rest API, serialized via Json.NET
The part that i am having difficulties with is passing an inheritance structure between the two applications:
ChildClass1 : BaseClass
ChildClass2 : BaseClass
I need to be able to deserialize a list of BaseClasses that have each individually been deserialized into their correct relative type:
JsonConvert.DeserializeObject<IEnumerable<BaseClass>>(json)
I am aware of the TypeNameHandling.All Serializer setting, but the problem i have is that the class on each application are in different namespaces:
Application 1:
App1.NameSpace.ChildClass1
Application 2:
App2.DifferentNameSpace.ChildClass1
Due to this it is not automatically converting them. It is not possible to change the namespaces or use a contract library for these classes.
Do i need to write a custom JsonReader? or is there a setting i can use to override the class name when being serialized / deserialized so that i can remove the namespace?
