diff options
| author | mrec <mike.capp@gmail.com> | 2014-06-26 02:26:41 +0100 |
|---|---|---|
| committer | mrec <mike.capp@gmail.com> | 2014-06-26 02:26:41 +0100 |
| commit | e1a9899a3a12f9f5fde6d5757c13bc248e89617d (patch) | |
| tree | 8663623d07a01cbeacb366494056a468c86e863b /src/rustllvm/RustWrapper.cpp | |
| parent | bab614f5fa725d248afc5f0530c835f37998ce8f (diff) | |
| download | rust-e1a9899a3a12f9f5fde6d5757c13bc248e89617d.tar.gz rust-e1a9899a3a12f9f5fde6d5757c13bc248e89617d.zip | |
json: Fix handling of NaN/Infinity
The JSON spec requires that these special values be serialized as null; the current serialization breaks any conformant JSON parser. So encoding needs to output "null", to_json on floating-point types can return Null as well as Number, and reading null when specifically expecting a number should be interpreted as NaN. There's no way to round-trip Infinity.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
