I need to serialize and deserialize a lot of different classes in my project.
Many of there classes have properies with private or internal setter, but for me it is important to deserialize these properties too.
Using a parameterised constuctor is not an option, because I need to keep references during the Json-roundtrip.
Adding [JsonInclude] would work, but then I have to add this to hundreds of properties.
So I tried to write a Custom Converter that just do the default deserialization, exept that all setters of properies are used.
But all of my versions end up in some error, once the references are not kept during deserialization, sometimes the recursive converter calls lead to stack overflow exception….
Have anyone created something similar?
Or is there an easy way to do this?