Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

如果 Bean 里面字段类型是 LinkedHashMap<Integer, Number> 的话,Number 里面如果出现浮点型数值,还是会被转为 BigDecimal #3326

Closed
asdf2014 opened this issue Jul 3, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@asdf2014
Copy link

asdf2014 commented Jul 3, 2020

使用 JSON.DEFAULT_PARSER_FEATURE &= ~Feature.UseBigDecimal.getMask() 方式,正常是可以避免 double 转 BigDecimal 的,但是如果 Bean 里面字段类型是 LinkedHashMap<Integer, Number> 的话,Number 里面如果出现浮点型数值,还是会被转为 BigDecimal

image

版本:1.2.70

@asdf2014
Copy link
Author

asdf2014 commented Jul 3, 2020

@wenshao PTAL

@wenshao wenshao added this to the 1.2.73 milestone Jul 4, 2020
@wenshao wenshao self-assigned this Jul 4, 2020
@wenshao wenshao added the bug label Jul 4, 2020
@wenshao
Copy link
Member

wenshao commented Jul 26, 2020

https://github.com/alibaba/fastjson/releases/tag/1.2.73
问题修复,请用新版本

@wenshao wenshao closed this as completed Jul 26, 2020
@asdf2014
Copy link
Author

@wenshao 赞啊,感谢大佬 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants