mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-05 10:15:19 +08:00
#863 undo wrong optimisation, fixing failing test
This commit is contained in:
@@ -2716,7 +2716,7 @@ public class JSONObject {
|
||||
} 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);
|
||||
|
Reference in New Issue
Block a user