title: Syntax:Error JSON.parse, When trying to load data for protovis
body: <p>Hi I'm learning how to work with protovis, so far so good, but now I stumbled upon a problem I can't seem to solve.</p>
  
  <p>The following is the code. (<em>I have the latest jquery loaded in my headers</em>)</p>
  
  <pre><code>&lt;script type="text/javascript+protovis"&gt; 
  var dataURL = "http://eagereyes.org/media/2010/protovis-primer/earthquakes.json";
  
  var JSONdata = $.ajax({ type: "GET", url: dataURL, async: false }).responseText;
  var earthquakes = JSON.parse(JSONdata);
  
  var width = 560;
  var height = 245;
  
  var barWidth = width/earthquakes.length;
  var gap = 2;
  
  new pv.Panel().width(width).height(height+5)
      .add(pv.Bar)
          .data(earthquakes)
          .bottom(0)
          .width(barWidth-gap)
          .height(function(d) d.Magnitude * (height/9))
          .left(function() this.index * barWidth)
      .root.render();
  </code></pre>
  
  <p></p>
  
  <p>When I try this in Firefox i get this alert:</p>
  
  <pre><code>Syntax:Error JSON.parse
  </code></pre>
  
  <p>I have validated the JSON on <a href="http://www.jsonlint.com/" rel="nofollow">http://www.jsonlint.com/</a> already. So the problem must be elsewhere.</p>
  
  <p>Anyone knows whats going on here?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I tried loading the same data in the protoviewer app: <a href="http://www.rioleo.org/protoviewer/" rel="nofollow">http://www.rioleo.org/protoviewer/</a>  and it works. So it must be the code.</p>