Concurrent Work
Rambling of a coder who craves for knowledge and understanding of the world.
All Posts
Tags
About
Fastjson
25
Apr 2017
api接口中设置double浮点类数的最大小数位
Written by Dongfang Qu
java开发的restful api中,偶尔需要将最大有效位限制在一个固定的范围内,如:最多保留小数点后4位。 一番dig后,整理一个简单方案记录如下: SerializeConfig.getGlobalInstance().put(Double.class, new …