title: save a canvas object as json
body: <p>How would I serialize a canvas object, like the one below?</p>
  
  <pre><code>            context.beginPath();
              context.rect(188, 50, 200, 100);
              context.fillStyle = 'yellow';
              context.fill();
              context.lineWidth = 7;
              context.strokeStyle = 'black';
              context.stroke();
  </code></pre>
  
  <p>Since it's interacting with the canvas context procedurally (is that the right terminology?) I don't think it's possible. But I would like to save objects like this so that it would be easier to manipulate them.</p>
  
  <p>I mean how could I create two items like the one above, but just modifying the x,y starting positions? All I can think of is <code>eval</code> but I know that would horribly slow down drawing on the canvas. </p>