mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-05 12:25:36 -04:00
#863 undo wrong optimisation, fixing failing test
This commit is contained in:
parent
d672b44a25
commit
e2194bc190
@ -2716,7 +2716,7 @@ public class JSONObject {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new JSONException(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) {
|
} else if (value instanceof Number) {
|
||||||
// not all Numbers may match actual JSON Numbers. i.e. fractions or Imaginary
|
// not all Numbers may match actual JSON Numbers. i.e. fractions or Imaginary
|
||||||
final String numberAsString = numberToString((Number) value);
|
final String numberAsString = numberToString((Number) value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user