def default(self, o): if isinstance(o, arrow.Arrow): return o.for_json() else: return super(self.__class__, self).default(o)