How do I prevent JSON serialization in ASP.NET MVC?

前端 未结 5 757
我寻月下人不归
我寻月下人不归 2021-02-13 00:04

While developing an ASP.NET MVC app, I\'m finding a few places where my JsonResult actions throw an exception \"A circular reference was detected while serializing an object\".<

5条回答
  •  再見小時候
    2021-02-13 01:03

    I would advise to use JSON.NET. It allows to serialize circular references and provides much more serialization options.

提交回复
热议问题