title: syntaxerror json.parse unexpected character at line 1 column 1 of the json data
body: <p>i Don't know what is the problem i got above syntax error in json.parse I m using like below code </p>
  
  <pre><code>Storage.prototype.setObject = function(key, value) {
     this.setItem(key, JSON.stringify(value));
  }
  
  Storage.prototype.getObject = function(key) {
     var value = this.getItem(key);
     return value &amp;&amp; JSON.parse(value);
  }
  
  function main() {
     var data = { 
         "a":"something1",
         "b":"something2"
     };
     sessionStorage.setObject('data',data);
     var newData = sessionStorage.getObject('data');
     console.log(newData);  
  }
  </code></pre>
  
  <p>while calling getObject('data') i got the error in " firefox " while " no error " in chrome pls help me to figure out the problem i run above sample code separately and it works fine for me but in my project where i m doing something same it cause error.</p>