.net - Circular reference when convert Ilist<T> to Json in s#arp -
I have two squares, in which they have more than one relationship.
When I s back to the list of classes of these tow, the ARP, everything is fine.
But when I try to convert these two lists into a Jason format, I get the "circular reference" exception.
I look for such an exception on the web, and this is a common question.
So, can I get rid of # ARP architecture with some exceptions for some solutions? Thank you.
How do you use "S # ARP" to return JSN? With "Jason return (list)"? So it's ASP. It's about Net / MVC only, there is no S # ARP business here, and you better add aspir net MVC tag in question to answer more people.
For the problem, there are two possible solutions:
- The system. Web. Script Serialization. Scripted Ignorative attribute either parent attributes or child items collection
- mapping for a list of other classes, e.g. (Select the new TMPIT (CID, C.Name) in the list from C).
But without looking at the actual class, I can not be told to make sure that and despite knowing what you use to convert lists to Jason
Comments
Post a Comment