Skip to content

Commit

Permalink
feat(bigdecimal): add discuss
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwenmai committed Feb 20, 2019
1 parent e0286ae commit ab1daf8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions content/discuss/2019-02-20-bigdecimal-show-string.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: 2019-02-20 浮点数如何输出
date: 2019-02-20T00:00:00+08:00
---

来源: Wechat discuss


### 将数据序列化为json的时候怎么让序列化后的 json 里面不要使用科学计数法
### json.Marshal 转出来的json怎么能不让转成科学计数法 大家有解决办法吗

```golang
dec := decimal.NewFromFloat(0.000001)
fmt.Println(dec.String())
```

## 参考资料

1. [shopspring/decimal](https://github.com/shopspring/decimal)

0 comments on commit ab1daf8

Please sign in to comment.