On Friday, 22 January 2016 at 11:53:11 UTC, Andrea Fontana wrote:
If you declare a JSONValue like this:
JSONValue json;
then:
assert(json.type() == JSON_TYPE.NULL);
Documentation at
https://dlang.org/phobos/std_json.html#.JSONValue.type.2
suggests not to change type but to assign a new valu
On Tuesday, 19 January 2016 at 15:25:58 UTC, wobbles wrote:
On Tuesday, 19 January 2016 at 14:07:50 UTC, Borislav Kosharov
wrote:
On Monday, 18 January 2016 at 12:46:31 UTC, Jonathan M Davis
wrote:
[...]
I want to use float time in a game where I call the update
method passing the delta time
On Monday, 18 January 2016 at 12:46:31 UTC, Jonathan M Davis
wrote:
In general, using floating point values with time is an
incredibly bad idea. It can certainly make sense when printing
stuff out, but using it in calculations is just asking for
trouble given all of the unnecessary imprecision
On Sunday, 17 January 2016 at 18:57:13 UTC, biozic wrote:
On Sunday, 17 January 2016 at 14:43:26 UTC, Borislav Kosharov
wrote:
Seeing that TickDuration is being deprecated and that I should
use Duration instead, I faced a problem. I need to get total
seconds like a float. Using .total!"seconds"
Seeing that TickDuration is being deprecated and that I should
use Duration instead, I faced a problem. I need to get total
seconds like a float. Using .total!"seconds" returns a long and
if the duration is less than 1 second I get 0. My question is
whats the right way to do it. Because I saw t
I want to split a string using multiple separators. In std.array
the split function has a version where it takes a range as a
separator, but it works differently than what I want. Say if I
call it with " -> " it will search for the whole thing together.
I want to pass split a list of separators
Thanks guys that was I was looking for!
I'm using std.json for parsing json. I need to check if a
specific string key is in JSONValue.object. The first thing I
tried was:
JSONValue root = parseJSON(text);
if(root["key"].isNull == false) {
//do stuff with root["key"]
}
But that code doesn't work, because calling root["key"] will