Bool setter for std.json

Tolga Cakiroglu tcak at pcak.com
Mon Feb 24 10:28:09 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.

Yes, it provides this, but while providing a method for other 
types, ignoring `bool` is not nice for D I think.

@monarch_dodra I think this is because JSON doesn't consider 0 
and non-zero as boolean values, and use `true` `false` keywords 
for this purpose.


More information about the Digitalmars-d mailing list