title: C# recursion limit when returning JSON
body: <p>I ran into an annoying issue recently. I'm going to simplify my datamodel here, but the principle is just the same. I have a class "User". In that class I have a property that is a list of objects the user owns. I also have this class "object". Because every "object" has an owner, it has a property of type "User", which links to its owner. Now, what I'm trying to do is basically this</p>
  
  <pre><code>return Json(myUser,JsonRequestBehavior.AllowGet);
  </code></pre>
  
  <p>When I load the page, it takes like 30 seconds and then I get the error "RecursionLimit exceeded".</p>
  
  <p>I guess this is because the objects are linking to each other. Now my question is, how can I tell "Json" that it shouldn't go deeper then 1 level of objects to avoid this?</p>