Issue 682 JSONString similarity

This commit is contained in:
Scott Paffrath
2022-08-05 11:00:33 -07:00
parent 6f92a3ab4e
commit 89f16ad0af
4 changed files with 54 additions and 0 deletions

View File

@@ -2142,6 +2142,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;
}