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

你可能感兴趣的:(Converter)