title: Safely turning a JSON string into an object
body: <p>Given a string of JSON data, how can I safely turn that string into a JavaScript object?</p>
  
  <p>Obviously I can do this unsafely with something like:</p>
  
  <pre><code>var obj = eval("(" + json + ')');
  </code></pre>
  
  <p>but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.</p>