fixes issue #573 by added specific compare of numeric types

This commit is contained in:
John J. Aylward
2020-11-19 18:24:56 -05:00
parent e4b76d6588
commit 11e6b1af7e
2 changed files with 54 additions and 1 deletions

View File

@@ -1374,6 +1374,8 @@ public class JSONArray implements Iterable<Object> {
if (!((JSONArray)valueThis).similar(valueOther)) {
return false;
}
} else if (valueThis instanceof Number && valueOther instanceof Number) {
return JSONObject.isNumberSimilar((Number)valueThis, (Number)valueOther);
} else if (!valueThis.equals(valueOther)) {
return false;
}