add a comment explaining the ordering

(cherry picked from commit df0e3e9ab73d99f1256055a17bd86c8a1a000b59)
This commit is contained in:
Simulant 2024-02-25 09:47:40 +01:00
parent 4f456d9432
commit f38452a00c

View File

@ -2706,7 +2706,7 @@ public class JSONObject {
if (value == null || value.equals(null)) { if (value == null || value.equals(null)) {
writer.write("null"); writer.write("null");
} else if (value instanceof JSONString) { } else if (value instanceof JSONString) {
// JSONString must be checked first, so it can overwrite behaviour of other types // JSONString must be checked first, so it can overwrite behaviour of other types below
Object o; Object o;
try { try {
o = ((JSONString) value).toJSONString(); o = ((JSONString) value).toJSONString();