title: Why does JSON.parse fail with the empty string?
body: <p>Why does:</p>
  <pre><code>JSON.parse('');
  </code></pre>
  <p>produce an error?</p>
  <pre><code>Uncaught SyntaxError: Unexpected end of input
  </code></pre>
  <p>Wouldn't it be more logical if it just returned <code>null</code>?</p>
  <p>EDIT: This is not a duplicate of the linked question. While the topic of minimal valid json is related to this question it does not get at the &quot;why&quot;.</p>