factory PCanvasElement.fromJson(Map<String, dynamic> j) { var className = j['className']; switch (className) { default: return PCanvasElement2D.fromJson(j); } }