mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-10 12:34:30 +08: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