刘珲的博客

导航

2020年8月28日 #

django解决Object of type Decimal is not JSON serializable

摘要: class DecimalEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, decimal.Decimal): return float(o) super(DecimalEncoder, self).default(o 阅读全文

posted @ 2020-08-28 14:24 刘珲的博客 阅读(501) 评论(0) 推荐(0) 编辑