6
有设置的方法吗?挺急的
有设置的方法吗?挺急的
JSON.toJSONString(obj, SerializerFeature.WriteBigDecimalAsPlain)
如果是序列化的bean对象有BigDecimal属性呢,怎么避免出现科学计数法? JSON.toJSONString(bean, SerializerFeature.WriteBigDecimalAsPlain) 返回的字符串仍然是科学计数法的。
问题已经解决,请使用1.2.49以上版本 #1982
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); FastJsonConfig fastJsonConfig = new FastJsonConfig(); fastJsonConfig.setSerializerFeatures(SerializerFeature.WriteBigDecimalAsPlain); converter.setFastJsonConfig(fastJsonConfig); 同样有这个问题