This commit is contained in:
Looly
2023-04-11 22:05:28 +08:00
parent 19f6ea76ca
commit eac3e0ae27
13 changed files with 30 additions and 30 deletions

View File

@@ -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());
}

View File

@@ -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());
}

View File

@@ -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());
}