title: Serializing object that contains cyclic object value
body: <p>I have an object (parse tree) that contains child nodes which are references to other nodes. </p>
  
  <p>I'd like to serialize this object, using <code>JSON.stringify()</code>, but I get </p>
  
  <blockquote>
    <p>TypeError: cyclic object value</p>
  </blockquote>
  
  <p>because of the constructs I mentioned. </p>
  
  <p>How could I work around this? It does not matter to me whether these references to other nodes are represented or not in the serialized object.</p>
  
  <p>On the other hand, removing these properties from the object when they are being created seems tedious and I wouldn't want to make changes to the parser (narcissus).</p>