vious chapter JavaScript code cannot be serialised to JSON.</p>
<div class="sourceCode" id="cb171"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb171-1"><a href="advanced-topics.html#cb171-1"></a><span class="co"># serialised as string</span></span>
<span id="cb171-2"><a href="advanced-topics.html#cb171-2"></a>jsonlite<span class="op">::</span><span class="kw">toJSON</span>(<span class="st">&quot;var x = 3;&quot;</span>)</span></code></pre></div>
<pre><code>## [&quot;var x = 3;&quot;]</cod