def simplify(self, precision): return self.segments(precision) # overwrite JSONEncoder for svg classes which have defined a .json() method