Skip to content

v0.2.3: feat(helper): 新增 UnmarshalUseNumber 函数

Choose a tag to compare

@isettle isettle released this 19 Feb 06:37
· 20 commits to master since this release
新增了 UnmarshalUseNumber 函数,用于解析 JSON 数据时将数字类型保留为原始格式。解决了在解析大数字时精度丢失的问题。

- 导入了 bytes 包以支持使用 bytes.NewReader
- 使用 json.NewDecoder 和 Decode 方法替代直接的 json.Unmarshal- 通过 d.UseNumber()保留数字的原始格式