std.json API broken without notice

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Mar 9 10:30:42 PDT 2014


On 3/9/14, 6:49 AM, Andrej Mitrovic wrote:
> On 3/9/14, Walter Bright <newshound2 at digitalmars.com> wrote:
>> BTW, I don't know if better unittest coverage would have detected this
>> particular breakage, but in any case, we should do better with coverage.
>
> Can someone finally say *what* broke?

I was wrong in my previous message. As Adam noted, it was making type 
read-only. Previously people would write:

v.type = JSON_TYPE.STRING;
v.str = "abc";

Now the second line sets the type, and the first is an error.

Also, this code is in error:

v.type = JSON_TYPE.TRUE;

and must be replaced with:

v = true;


Andrei



More information about the Digitalmars-d mailing list