mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
当用户选择ignoreError时,错误对象转JSON也忽略
This commit is contained in:
@@ -45,7 +45,7 @@ public class JSONUtilTest {
|
||||
*/
|
||||
@Test
|
||||
public void parseNumberTest2() {
|
||||
final JSONObject json = JSONUtil.parseObj(123L);
|
||||
final JSONObject json = JSONUtil.parseObj(123L, JSONConfig.create().setIgnoreError(true));
|
||||
Assert.assertEquals(new JSONObject(), json);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user