title: Running JSON through Python's eval()?
body: <p>Best practices aside, is there a compelling reason <strong>not</strong> to do this?</p>
  
  <p>I'm writing a post-commit hook for use with a Google Code project, which provides commit data via a JSON object.  GC provides an HMAC authentication token along with the request (outside the JSON data), so by validating that token I gain high confidence that the JSON data is both benign (as there's little point in distrusting Google) and valid.</p>
  
  <p>My own (brief) investigations suggest that JSON happens to be completely valid Python, with the exception of the <code>"\/"</code> escape sequence — which GC doesn't appear to generate.</p>
  
  <p>So, as I'm working with Python 2.4 (i.e. no <code>json</code> module), <code>eval()</code> is looking <em>really</em> tempting.</p>
  
  <p><strong>Edit:</strong> For the record, I am very much <strong>not</strong> asking if this is a good idea.  I'm <em>quite</em> aware that it isn't, and I very much doubt I'll ever use this technique for any future projects even if I end up using it for this one.  I just wanted to make sure that I know what kind of trouble I'll run into if I do.  :-)</p>