an>
  <span class="hljs-built_in">console</span>.log(libModel.getDeclarationByName(<span class="hljs-string">&apos;Book&apos;</span>).toJsonSchema)

  <span class="hljs-comment">// Type can also be selected by index</span>
  <span class="hljs-built_in">console</span>.log(libModel.declares[<span class="hljs-number">0</span>].toJsonSchema)
}

main()
</code></pre>
<pre><code class="lang-java"><span class="hljs-comment">// java</span>
<span class="hljs-keyword">package</span> co.acme.translate;

<span class="hl