title: Cannot parse JSON?
body: <p>Here's my javascript file</p>
  
  <pre><code>var callAjax = function(relative_path){
          var Ajax =  new XMLHttpRequest();
              Ajax.onreadystatechange = function() {
  
                  //Since what we are calling a local file. we cannot get a 200 OK Status.
                  //So We check only the readystate
                  if(Ajax.readyState==4){
                      serialized = Ajax.responseText;
                      alert(serialized); 
                      // ^^ alerts fine.
                      return serialized;
                  }
  
              }
  
              Ajax.open("GET",relative_path, true);
              Ajax.send();    
  };
  
  
  var readSettings = function(){
      var data = callAjax('settings.json');
      obj  = JSON.parse(data);
      alert(obj);
  }
  </code></pre>
  
  <p>Now when i call <code>readSettings()</code> somewhere in my html, the first alert (in the callAjax functions alerts the JSON correctly. but the second one does not. When i see the console, the error is :</p>
  
  <blockquote>
    <p>[21:04:02.233] SyntaxError: JSON.parse: unexpected character @ file:///home/cipher/Codes/looma-f5/js/looma.js:23</p>
  </blockquote>
  
  <p>My settings.json is:</p>
  
  <pre><code>{
  
      "classes": 8,
      "config": "classConfig",
      "locale": {
          "en": "localeEn"
      },
      "defaultLocale": "en"
  }
  </code></pre>
  
  <p>I ran the JSON through online tools, it looks good. Why is  firefox not parsing these?</p>