https://issues.dlang.org/show_bug.cgi?id=15884

--- Comment #1 from Lionello Lunesu <lio+bugzi...@lunesu.com> ---
Ugh, I understand why it's the way it is.

Should we do .idup in JSONValue? Either way there's going to be an allocation,
either for the JSONValue[] or for the string.

The repro might seem convoluted, but I ran into it like this: a method returns
a char[], in order to give the caller full r/w control, which is what such a
"toString" function is supposed to do. Using this return value (which thanks to
"auto" is not obvious) in a JSONValue results in a less than ideal JSON.

--

Reply via email to