We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fastjson版本 1.2.55
@JSONField(serialzeFeatures = SerializerFeature.WriteBigDecimalAsPlain) private BigDecimal num;
如上,在实体类的属性上加了JSONField注解,并指定serialzeFeatures=SerializerFeature.WriteBigDecimalAsPlain不生效 试图解决的问题: 当num的值为0.00000001时,默认toString后的值为科学计数法1e-8,业务需要展示为0.00000001
采用SON.toJSONString(bean, SerializerFeature.WriteBigDecimalAsPlain)可以达到出预期结果 采用@JSONField(serialzeFeatures = SerializerFeature.WriteBigDecimalAsPlain)及JSON.toJSONString(bean),无法达到预期效果
The text was updated successfully, but these errors were encountered:
谢谢,这个蛋疼的fastjson
Sorry, something went wrong.
No branches or pull requests
fastjson版本 1.2.55
如上,在实体类的属性上加了JSONField注解,并指定serialzeFeatures=SerializerFeature.WriteBigDecimalAsPlain不生效
试图解决的问题:
当num的值为0.00000001时,默认toString后的值为科学计数法1e-8,业务需要展示为0.00000001
采用SON.toJSONString(bean, SerializerFeature.WriteBigDecimalAsPlain)可以达到出预期结果
采用@JSONField(serialzeFeatures = SerializerFeature.WriteBigDecimalAsPlain)及JSON.toJSONString(bean),无法达到预期效果
The text was updated successfully, but these errors were encountered: