title: Firefox JSON "not well formed" errror on valid JSON
body: <p>I'm receiving the following error message in Firefox:</p>
  
  <pre><code>Error: not well-formed
  Source File: http://school/courses.booking.add.php?1287657494723
  Line: 1, Column: 1
  Source Code:
  {"type":"error","message":"You have already booked this course."}
  </code></pre>
  
  <p>As you can see, the output is valid JSON (it's created by PHP's <code>json_encode()</code> function). And it's served with the <code>application/json</code> MIME type. I thought the error might be something to do with the parsing:</p>
  
  <pre><code>eval: function(json) {
      return eval('(' + json + ')');
  }
  </code></pre>
  
  <p>But even if I don't parse the string, and simply alert the returned JSON response, the error still shows up.</p>
  
  <p>Related Question: <a href="https://stackoverflow.com/questions/677902/not-well-formed-error-in-firefox-when-loading-json-file-with-xmlhttprequest">&quot;not well-formed&quot; error in Firefox when loading JSON file with XMLHttpRequest</a>. His solution was to fix the MIME type. Mine's already accurate, so it must be something else.</p>