canvas.toJSON() rounds object.scaleX and object.scaleY to two decimals (and maybe other properties as well). This is really annoying if you try to connect/snap multiple objects. On canvas they connect but after exporting to (and importing from) JSON they are out of place (shifted).
DEMO: http://vps.matthijskuiper.nl/test/2/
This demo includes a workaround as well (.toJSON(['scaleX', 'scaleY'])).
But I think toJSON shouldn't be rounding values hence this issue.
You can increase the number of decimals to round:
fabric.Object.NUM_FRACTION_DIGITS = 10;
Wow thanks, wish I found out about this sooner...
Most helpful comment
You can increase the number of decimals to round: