code: public String toJSON() {
          JSONEmitter json = new JSONEmitter();
          json.startDocument();
          toJSON(json);
          json.endDocument();
          return json.toString();
      }
docs: Convert the DOM tree rooted at this UNode into a JSON document.
  
  @return  JSON document for the DOM tree rooted at this UNode.