class="pre">generate/2</span></code> takes, as second argument, a Prolog term that
corresponds to the JSON syntax in Prolog and produces the corresponding
JSON output in the format specified in the first argument:
(<code class="docutils literal notranslate"><span class="pre">codes(Variable)</span></code>, <code class="docutils literal notranslate"><span class="pre">stream(Stream)</span></code>, <code class="docutils literal notranslate"><span class="pre">file(File)</span></code>,
<code class="docutils liter