def default(self, obj):
        if hasattr(obj, 'json_repr'):
            return self.default(obj.json_repr())

        if isinstance(obj, datetime.datetime):
            return obj.isoformat()

        if isinstance(obj, collections.Iterable) and not is_stringy(obj):
            try:
                return {k: self.default(v) for k, v in obj.items()}
            except __HOLE__:
                return [self.default(e) for e in obj]

        return obj
dataset/ETHPy150Open thefactory/marathon-python/marathon/util.py/MarathonJsonEncoder.default