Background
I am re-architecting a large project where data has been serialized to Json and stored in a database.
Various property members of objects to be serialised may be of types derived from the member definition.
So the property will be defined as an IFoo or BarBase, however represent a SpecialisedFoo or SpecialisedBar instance. In order to manage the serialisation the current implementation serialises the type to the Json and assemble to the json so that the deserialiser can know where to get the type from.
To my mind this is a bit of a smelly way of serialising/deserialisation because it ties the serialized data to the implmentation of the deserialised data.
Question
Is there a way of getting into the serialisation pipeline of the Newtonsoft Deserialiser with the data to be deserialised before the instantiation of the object so I have the choice over what type the deserialised object will be.