mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
fixes issue #573 by added specific compare of numeric types
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user