Bool setter for std.json

monarch_dodra monarchdodra at gmail.com
Mon Feb 24 10:22:41 PST 2014


On Monday, 24 February 2014 at 18:14:23 UTC, Adam D. Ruppe wrote:
> The opAssign overload handles things sanely.
>
> So use
>
> JSON_VALUE v;
>
> v = true;
>
> and so on instead of the properties when setting.

Why does the JSON_TYPE enum have "TRUE" and "FALSE" to begin 
with? Shouldn't it just be a single "BOOLEAN" type with two 
values?

Is it just "historic", or is there an actual rationale to this?


More information about the Digitalmars-d mailing list