title: Loading JSON in canvas with fabric.js
body: <p>I am trying to save data in JSON and load it back into the canvas with <strong>fabric.js</strong> I keep getting errors likep with the following simple code:</p>
  
  <pre><code>canvas.add(new fabric.Rect({ width: 50, height: 50, fill: 'red', top: 100, left: 100 }));
  var c = canvas.toJSON();
  canvas.clear();
  canvas.loadFromJSON(c);
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>SyntaxError: JSON.parse: unexpected character
  [Break On This Error] var Cufon=(function(){var k=function()....Image.fromElement.async=true})(this);
  </code></pre>
  
  <p>When I use my own JSON, It validates well, but I still get errors when I use whatever was output by fabric's method canvas.toJSON(). Anyone would have working examples of loading back into an empty canvas data saved from a previous canvas state in fabric.js? It would be greatly appreciated!</p>