Self referencing loop in Json.Net JsonSerializer from custom JsonConverter (Web API)

Use JsonSerializerSettings

Example:

JsonConvert.SerializeObject(YourPOCOHere,Formatting.Indented,newJsonSerializerSettings(){ReferenceLoopHandling=ReferenceLoopHandling.Serialize});

Reference http://json.codeplex.com/discussions/272371

posted @ 2013-04-04 09:02  赤狐(zcm123)  阅读(410)  评论(0)    收藏  举报