def default(self, obj):
        if hasattr(obj, 'isoformat'):
            return "%sZ" % (obj.replace(tzinfo=None).isoformat(), )
        if hasattr(obj, "strftime"):
            try:
                microsecond = obj.microsecond
            except __HOLE__:
                microsecond = int(1000000*math.modf(obj.second)[0])
            if microsecond:
                return u"%s.%sZ" % (obj.strftime("%Y-%m-%dT%H:%M:%S"), microsecond)
            return u"%sZ" % (obj.strftime("%Y-%m-%dT%H:%M:%S"),)
        return super(SunburntJSONEncoder, self).default(obj)
dataset/ETHPy150Open tow/sunburnt/sunburnt/json.py/SunburntJSONEncoder.default