title: Doubly Linked List to JSON
body: <p>I've a three dimensional structure ... actually a doubly linked list with six nodes i.e. left, right, up, down, in, out. if one node is on the right side of other then that node will be defiantly on the left side of the first one. like </p>
  
  <p><img src="https://i.stack.imgur.com/1MjFI.png" alt="2D sample of 3D actual data struture"></p>
  
  <p>Actually this is a 3D structure, but for understanding purposes, I've given a 2D example.
  Now I've to convert it in JSON format, to send this data through WCF to a client, but as it contains loops so it couldn't be converted to JSON. I've these questions</p>
  
  <ol>
  <li>Can this type of doubly linked list be converted to JSON?  </li>
  <li>Is there another way to do that?  </li>
  <li>Any Other recommended Data Structure? If this is impossible using Doubly Linked List. </li>
  </ol>
  
  <p>I'm using <a href="http://json.codeplex.com/" rel="noreferrer">Json.Net</a> to handle JSON.</p>
  
  <p>My class is</p>
  
  <pre><code>public class Node
  {
      public Document document = null;
  
      public Node left = null;
      public Node right = null;
      public Node up = null;
      public Node down = null;
      public Node inside = null;
      public Node outside = null;
  }
  </code></pre>