Merge branch 'master' into update-copyright

This commit is contained in:
stleary
2022-08-26 20:59:00 -05:00
4 changed files with 54 additions and 0 deletions

View File

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

View File

@@ -2125,6 +2125,10 @@ public class JSONObject {
if (!isNumberSimilar((Number)valueThis, (Number)valueOther)) {
return false;
}
} else if (valueThis instanceof JSONString && valueOther instanceof JSONString) {
if (!((JSONString) valueThis).toJSONString().equals(((JSONString) valueOther).toJSONString())) {
return false;
}
} else if (!valueThis.equals(valueOther)) {
return false;
}