I guess what you are looking for is the TypeNameHandling in the JsonSerializerSettings which you need to add for de- and serialization.
Just set it to TypeNameHandling.Auto which will add a type property to the json for instances which have a type not equal to the declared type.