In one of my projects I have a class that contains a lot of properties and a lot of interfaces. When the class is exposed using a Web API, the browser version displays the XML-serialized version of the class, which is okay. But when I use it in JavaScript, the JSON version is used and I get the NewtonSoft-related exception "An item with the same key has already been added.
" Because the XML-serialization does work, I assume it is caused by a duplicate class property name, but I do not know how to find the culprit.
My question is: How can I determine which class property causes this exception?