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