I have a C# application that uses JSON. There is a bug and it's a little bit complicated so I'll give an example. If we have this class:
public class FatherObj
{
public SonObj Son {get; set;}
}
public class SonObj
{
public List<GrandChildObj> GrandChildren {get; set;}
}
Then when deserializing with JSON object FatherObj, The list of GrandChildren in the object SonObj gets duplicated. I fixed it by adding above the declaration of the list the following code:
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)]
However, when I tried adding it to the JSON serialization setting of the whole application, it caused problems. So, I decided to make a JsonConverter that will only apply to List objects and when deserializing it will call the Distinct method before returning. But, JsonConverter is an abstract class, so when implementing it's methods you cannot call any base methods (as they are abstract as well). How do I call the default converter settings? I do not want to create different conversion besides the distinct.