boolean validate = JSONValidator.from(s).validate();
boolean validArray = JSON.isValidArray(s);
if (!validArray == validate) {
System.out.println(validArray+" -- "+validate);
System.out.println(">>>>>>>>>"+s);
}
结果
false -- true
35840148809
validate把数字也判断通过了 ,是我用法错了吗
1条答案
按热度按时间utugiqy61#
用
JSONValidator.from(s).getType() == JSONValidator.Type.Array
来判断