mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
rename
This commit is contained in:
@@ -16,7 +16,7 @@ public class JSONNullTest {
|
||||
Assertions.assertNull(bodyjson.get("device_status_date"));
|
||||
Assertions.assertNull(bodyjson.get("imsi"));
|
||||
|
||||
bodyjson.getConfig().setIgnoreNullValue(true);
|
||||
bodyjson.config().setIgnoreNullValue(true);
|
||||
Assertions.assertEquals("{\"act_date\":\"2021-07-23T06:23:26.000+00:00\"}", bodyjson.toString());
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ public class JSONObjectTest {
|
||||
//noinspection MismatchedQueryAndUpdateOfCollection
|
||||
final JSONObject jsonObject = new JSONObject(str);
|
||||
Assertions.assertEquals("{\"code\":500,\"data\":null}", jsonObject.toString());
|
||||
jsonObject.getConfig().setIgnoreNullValue(true);
|
||||
jsonObject.config().setIgnoreNullValue(true);
|
||||
Assertions.assertEquals("{\"code\":500}", jsonObject.toString());
|
||||
}
|
||||
|
||||
|
@@ -260,7 +260,7 @@ public class JSONUtilTest {
|
||||
Assertions.assertEquals("{\"test2\":12.0}", jsonObject.toString());
|
||||
|
||||
// 去除多余的0
|
||||
jsonObject.getConfig().setStripTrailingZeros(true);
|
||||
jsonObject.config().setStripTrailingZeros(true);
|
||||
Assertions.assertEquals("{\"test2\":12}", jsonObject.toString());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user