mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
当用户选择ignoreError时,错误对象转JSON也忽略
This commit is contained in:
@@ -31,6 +31,16 @@ public class JSONUtilTest {
|
||||
Console.log(jsonArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数字解析为JSONArray报错
|
||||
*/
|
||||
@Test
|
||||
public void parseNumberToJSONArrayTest2() {
|
||||
final JSONArray json = JSONUtil.parseArray(123L,
|
||||
JSONConfig.create().setIgnoreError(true));
|
||||
Assert.assertNotNull(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数字解析为JSONArray报错
|
||||
*/
|
||||
|
Reference in New Issue
Block a user