title: fabric.js canvas to json with svg custom attributes
body: <p>I added new attributes for path svg:</p>
  
  <pre><code>   var canvas = new fabric.Canvas('c');
     var group = [];
  
  
  fabric.loadSVGFromURL(svg_file, function(objects,options) {
              var obj = fabric.util.groupSVGElements(objects, options);
              obj.set({
                  left: 100,
                  top: 100
              });
              canvas.add(obj);
              canvas.renderAll();
  
          },
          // add new attributes
          function(item, object) {
              object.set('id',item.getAttribute('id'));
              object.set('tag_id', tag_id);
              object.set('elem_id', elem_id );
              group.push(object);
          }
  );
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>// see new attributes
  console.log(canvas.getObjects());
  // save to JSON
  console.log('json:', canvas.toJSON())
  </code></pre>
  
  <p>But new attributes not save.
  <a href="https://stackoverflow.com/questions/15763057/saving-json-in-canvas-with-fabric-js">Saving JSON in canvas with fabric.js</a> not work for me.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/15763057/saving-json-in-canvas-with-fabric-js">Saving JSON in canvas with fabric.js</a>,<br>
  it says to create a new class based on fabric.Image, it works for me,
  but what to do with fabric.LoadSVGFromURL and fabric.util.groupSVGElements?
  Need to create a new class or something else? Help me.</p>
  
  <p><strong>Solved:</strong></p>
  
  <p><a href="https://github.com/kangax/fabric.js/issues/471" rel="nofollow noreferrer">https://github.com/kangax/fabric.js/issues/471</a></p>
  
  <p><a href="http://jsfiddle.net/Ypn2k/4/" rel="nofollow noreferrer">http://jsfiddle.net/Ypn2k/4/</a></p>