Re: Bug in std.json or my problem

2020-04-22 Thread Craig Dillabaugh via Digitalmars-d-learn
On Wednesday, 22 April 2020 at 18:35:49 UTC, CraigDillabaugh wrote: On Wednesday, 22 April 2020 at 18:23:48 UTC, Anonymouse wrote: On Wednesday, 22 April 2020 at 17:48:18 UTC, Craig Dillabaugh wrote: clip File an issue if you have the time, maybe it will get attention. Unreported bugs can

Re: Bug in std.json or my problem

2020-04-22 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 22 April 2020 at 18:23:48 UTC, Anonymouse wrote: On Wednesday, 22 April 2020 at 17:48:18 UTC, Craig Dillabaugh wrote: The crash is caused because the 'income' field with value 0.0 is output as 0 (rather than 0.0) and when it is read this is interpreted as an integer. Shouldn't

Re: Bug in std.json or my problem

2020-04-22 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 22 April 2020 at 17:48:18 UTC, Craig Dillabaugh wrote: The crash is caused because the 'income' field with value 0.0 is output as 0 (rather than 0.0) and when it is read this is interpreted as an integer. Shouldn't this work? Yes, it's just buggy. Giving it a value of an even

Bug in std.json or my problem

2020-04-22 Thread Craig Dillabaugh via Digitalmars-d-learn
So perhaps I am the only person in the world using std.json, but I was wondering if the following code should work. = import std.json; import std.conv; import std.stdio; struct Person { string name; float income;