

def default(self, obj):
    if hasattr(obj, 'isoformat'):
        return ('%sZ' % (obj.replace(tzinfo=None).isoformat(),))
    if hasattr(obj, 'strftime'):
        try:
            microsecond = obj.microsecond
        except AttributeError:
            microsecond = int((1000000 * math.modf(obj.second)[0]))
        if microsecond:
            return ('%s.%sZ' % (microsecond.strftime('%Y-%m-%dT%H:%M:%S'), microsecond))
        return ('%sZ' % (obj.strftime('%Y-%m-%dT%H:%M:%S'),))
    return super(SunburntJSONEncoder, self).default(obj)

dataset/ETHPy150Open tow/sunburnt/sunburnt/json.py SunburntJSONEncoder.default/VarMisuse@102/124 `obj`->`microsecond`