Skip to content

Commit

Permalink
stleary#863 undo wrong optimisation, fixing failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Simulant87 committed Feb 24, 2024
1 parent d672b44 commit e2194bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ static final Writer writeValue(Writer writer, Object value,
} catch (Exception e) {
throw new JSONException(e);
}
writer.write(o != null ? o.toString() : "\"\"");
writer.write(o != null ? o.toString() : quote(value.toString()));
} else if (value instanceof Number) {
// not all Numbers may match actual JSON Numbers. i.e. fractions or Imaginary
final String numberAsString = numberToString((Number) value);
Expand Down

0 comments on commit e2194bc

Please sign in to comment.