This sample sets T:Newtonsoft.Json.ReferenceLoopHandling to Ignore so that looping values are excluded from serialization instead of throwing an exception.
Sample