diff --git a/std/json.d b/std/json.d index 9125e0a..c69b096 100644 --- a/std/json.d +++ b/std/json.d @@ -1140,7 +1140,8 @@ string toJSON(in JSONValue* root, in bool pretty = false, in JSONOptions options } } else { - json.put(to!string(val)); + import std.format : format; + json.put("%f".format(val)); } break;