[Issue 14399] New: std.json cannot parse its own output for nan
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 2 19:50:55 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14399
Issue ID: 14399
Summary: std.json cannot parse its own output for nan
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: murphyslaw480 at gmail.com
JSONValue(["val" : float.nan]).toString yeilds `{"val":nan}`.
'nan' is not wrapped in quotes.
However, if you call parseJSON on this string, it fails:
"Found 'a' when expecting 'u'" (I guess its trying to parse 'null').
I would expect std.json to be able to parse the strings it outputs.
--
More information about the Digitalmars-d-bugs
mailing list