nByName(<span class="hljs-string">&quot;Book&quot;</span>).get();
    System.out.println(book.toJsonSchema());

    <span class="hljs-comment">// Type can also be selected by index</span>
    NodeShape book2 = (NodeShape) doc.declares().get(<span class="hljs-number">0</span>);
    System.out.println(book2.toJsonSchema());
  }
}
</code></pre>
<h2 id="complete-examples">Complete examples</h2>
<ul>
<li><a href="https://github.com/raml-org/webapi-parser/blob/master/examples/js/ramldt-jsonschema.js" target="_bla