Bool setter for std.json

Tolga Cakiroglu tcak at pcak.com
Mon Feb 24 09:06:24 PST 2014


When I was using 2.064.2, I had a piece of code as below:

json.integer = T;
json.type = ((T == true) ? std.json.JSON_TYPE.TRUE : 
std.json.JSON_TYPE.FALSE);


After installing 2.065, the line I am setting the json type is 
not valid any more. The weird thing is that there is not specific 
`bool` method for JSONValue at all. At least for setting the 
value. Yes, I maybe can write as json.integer( true ) now, but 
that is not nice way to do this I think. Is there any reason not 
to add `bool` method into `std.json.JSONValue`?


More information about the Digitalmars-d mailing list