described changes wrt. overflows
1 parent
861efac403
commit
2b16891975
1 file changed
+7
-1
+7
-1
@@ -47,4 +47,10 @@ or
|
|||||||
```cpp
|
```cpp
|
||||||
json j;
|
json j;
|
||||||
ss >> j;
|
ss >> j;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Handling of NaN and INF
|
||||||
|
|
||||||
|
- If an overflow occurs during parsing a number from a JSON text, an exception (`std::out_of_range` for the moment, to be replaced by a user-defined exception) is thrown so that the overflow is detected early and roundtripping is guaranteed.
|
||||||
|
|
||||||
|
- NaN and INF floating-point values can be stored in a JSON value and are not replaced by null. That is, the basic_json class behaves like double in this regard (no exception occurs). However, NaN and INF are serialized to “null”.
|
||||||
Reference in new issue
Block a user