标签:log not instance port sdn %s https pytho ali
原文:https://blog.csdn.net/suibianshen2012/article/details/64444030
import json import datetime class DateEncoder(json.JSONEncoder): def default(self,obj): if isinstance(obj,datetime.datetime): return obj.strftime(‘%Y-%m-%d %H:%M:%S‘) elif isinstance(obj,date): return obj.strftime("%Y-%m-%d") else: return json.JSONEncoder.default(self,obj)
python datetime.datetime is not JSON serializable 报错问题解决
标签:log not instance port sdn %s https pytho ali
原文地址:https://www.cnblogs.com/bubutianshu/p/12371459.html