code: public static String renderModelAsJson(Node rootNode, boolean renderRoot) {
          if (renderRoot) {
              return renderSubnodes(rootNode == null ? new ArrayList<Node>() : new ArrayList<Node>(Arrays.asList(rootNode)));
          } else if (rootNode != null && rootNode.hasChild()) {
              return renderSubnodes(rootNode.getChilds());
          }
  
          return "";
      }
docs: Render the node model as JSON
  
  @param rootNode
  @param renderRoot
  @return