mirror of
https://github.com/nlohmann/json.git
synced 2026-10-04 13:40:33 +00:00
deploy: 63c10a51fc
This commit is contained in:
@@ -20,15 +20,15 @@ To store integer numbers in C++, a type is defined by the template parameter `Nu
|
||||
|
||||
## Notes
|
||||
|
||||
#### Default type
|
||||
### Default type
|
||||
|
||||
With the default values for `NumberIntegerType` (`std::int64_t`), the default value for `number_integer_t` is `std::int64_t`.
|
||||
|
||||
#### Default behavior
|
||||
### Default behavior
|
||||
|
||||
- The restrictions about leading zeros are not enforced in C++. Instead, leading zeros in integer literals lead to an interpretation as an octal number. Internally, the value will be stored as a decimal number. For instance, the C++ integer literal `010` will be serialized to `8`. During deserialization, leading zeros yield an error.
|
||||
|
||||
#### Limits
|
||||
### Limits
|
||||
|
||||
[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies:
|
||||
|
||||
@@ -42,7 +42,7 @@ When the default type is used, the maximal integer number that can be stored is
|
||||
|
||||
As this range is a subrange of the exactly supported range [INT64_MIN, INT64_MAX], this class's integer type is interoperable.
|
||||
|
||||
#### Storage
|
||||
### Storage
|
||||
|
||||
Integer number values are stored directly inside a `basic_json` type.
|
||||
|
||||
@@ -71,6 +71,13 @@ Output:
|
||||
true
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [number_unsigned_t](https://json.nlohmann.me/api/basic_json/number_unsigned_t/index.md) the type used to store JSON unsigned integer numbers
|
||||
- [number_float_t](https://json.nlohmann.me/api/basic_json/number_float_t/index.md) the type used to store JSON floating-point numbers
|
||||
- [is_number_integer](https://json.nlohmann.me/api/basic_json/is_number_integer/index.md) checks whether the JSON value is a signed integer number
|
||||
- [Number Handling](https://json.nlohmann.me/features/types/number_handling/index.md) - the article on number handling
|
||||
|
||||
## Version history
|
||||
|
||||
- Added in version 1.0.0.
|
||||
|
||||
Reference in New Issue
Block a user