Use FastJson serialized and stored in MongoDB after deserialization, Doule type into a String

 // 关键代码
 int disableDecimalFeature = JSON.DEFAULT_PARSER_FEATURE & ~Feature.UseBigDecimal.getMask();
 String str = JSON.toJSON(testEntity).toString();
 //JSONObject JB = JSON.parseObject(str);
 JSONObject JB = JSON.parseObject(str,JSONObject.class,disableDecimalFeature);

Original Address: https: //blog.csdn.net/Jeremykim1026/article/details/102784658

Published 24 original articles · won praise 14 · views 60000 +

Guess you like

Origin blog.csdn.net/biubiu2it/article/details/103521959