equal
deleted
inserted
replaced
408 elif isinstance(obj, pydatetime.date): |
408 elif isinstance(obj, pydatetime.date): |
409 return obj.strftime('%Y/%m/%d') |
409 return obj.strftime('%Y/%m/%d') |
410 elif isinstance(obj, pydatetime.time): |
410 elif isinstance(obj, pydatetime.time): |
411 return obj.strftime('%H:%M:%S') |
411 return obj.strftime('%H:%M:%S') |
412 elif isinstance(obj, pydatetime.timedelta): |
412 elif isinstance(obj, pydatetime.timedelta): |
413 return '%10d.%s' % (obj.days, obj.seconds) |
413 return (obj.days * 24 * 60 * 60) + obj.seconds |
414 elif isinstance(obj, decimal.Decimal): |
414 elif isinstance(obj, decimal.Decimal): |
415 return float(obj) |
415 return float(obj) |
416 try: |
416 try: |
417 return JSONEncoder.default(self, obj) |
417 return JSONEncoder.default(self, obj) |
418 except TypeError: |
418 except TypeError: |