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.
according to this discussion, it seems that the problem appends when the value is written: "null" should be written instead of "nan": http://tools.ietf.org/html/rfc4627 " Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted." (https://code.google.com/p/go/issues/detail?id=3480)
https://github.com/D-Programming-Language/phobos/pull/3141