Skip to content

Commit

Permalink
add a comment explaining the ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Simulant87 committed Feb 25, 2024
1 parent d17bbbd commit df0e3e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -2701,6 +2701,7 @@ static final Writer writeValue(Writer writer, Object value,
if (value == null || value.equals(null)) {
writer.write("null");
} else if (value instanceof JSONString) {
// JSONString must be checked first, so it can overwrite behaviour of other types below
Object o;
try {
o = ((JSONString) value).toJSONString();
Expand Down

0 comments on commit df0e3e9

Please sign in to comment.