Decima json 化
2021-03-27 22:25
标签:detail data turn java instance http class self oat Decima json 化 标签:detail data turn java instance http class self oat 原文地址:https://www.cnblogs.com/gylong/p/12627022.htmlclass DecimalEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, decimal.Decimal):
return float(o)
super(DecimalEncoder, self).default(o)
j = json.dumps(jsonData,cls=DecimalEncoder)#
原文链接:https://blog.csdn.net/No1Brother_Jian/java/article/details/91346462