def default(self, obj):
if not isinstance(obj, tuple(svgClass.values() + [Svg])):
return json.JSONEncoder.default(self, obj)
if not hasattr(obj, 'json'):
return repr(obj)
return obj.json()
# Code executed on module load #
# SVG tag handler classes are initialized here
# (classes must be defined before)
评论列表
文章目录