json - How to determine cause of "An item with the same key has already been added" exception -
in 1 of projects have class contains lot of properties , lot of interfaces. when class exposed using web api, browser version displays xml-serialized version of class, okay. when use in javascript, json version used , newtonsoft-related exception "an item same key has been added.
" because xml-serialization work, assume caused duplicate class property name, not know how find culprit.
my question is: how can determine class property causes exception?
is thread modifying structure while serialize it? observed datacontractjsonserializer generate either "collection modified; enumeration operation may not execute." or create json duplicate keys, in turn generates "an item same key has been added." when try read it.
Comments
Post a Comment