From cdfe86548673808042d8abe1dc61e8a86b87dc58 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 28 Apr 2021 20:33:05 +0200 Subject: [PATCH] :memo: add documentation for numbers --- .github/CONTRIBUTING.md | 2 +- doc/images/json_syntax_number.png | Bin 0 -> 37014 bytes doc/mkdocs/Makefile | 2 +- doc/mkdocs/docs/api/basic_json/array_t.md | 4 +- doc/mkdocs/docs/api/basic_json/boolean_t.md | 2 +- .../docs/api/basic_json/number_float_t.md | 4 +- .../docs/api/basic_json/number_integer_t.md | 6 +- .../docs/api/basic_json/number_unsigned_t.md | 6 +- doc/mkdocs/docs/api/basic_json/object_t.md | 6 +- doc/mkdocs/docs/api/basic_json/string_t.md | 4 +- doc/mkdocs/docs/features/iterators.md | 2 +- .../features/{types.md => types/index.md} | 28 +- .../docs/features/types/number_handling.md | 313 ++++++++++++++++++ doc/mkdocs/docs/home/releases.md | 2 +- doc/mkdocs/mkdocs.yml | 6 +- include/nlohmann/detail/input/lexer.hpp | 6 +- include/nlohmann/json.hpp | 36 +- single_include/nlohmann/json.hpp | 42 +-- test/src/unit-class_parser.cpp | 8 +- test/src/unit-testsuites.cpp | 4 +- 20 files changed, 400 insertions(+), 83 deletions(-) create mode 100644 doc/images/json_syntax_number.png rename doc/mkdocs/docs/features/{types.md => types/index.md} (91%) create mode 100644 doc/mkdocs/docs/features/types/number_handling.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7f12d50708..a9c0b46923 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -58,7 +58,7 @@ To make changes, you need to edit the following files: - Specifically, I am aware of compilation problems with **Microsoft Visual Studio** (there even is an [issue label](https://github.com/nlohmann/json/issues?utf8=✓&q=label%3A%22visual+studio%22+) for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project. - Please refrain from proposing changes that would **break [JSON](https://json.org) conformance**. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension. - We shall not extend the library to **support comments**. There is quite some [controversy](https://www.reddit.com/r/programming/comments/4v6chu/why_json_doesnt_support_comments_douglas_crockford/) around this topic, and there were quite some [issues](https://github.com/nlohmann/json/issues/376) on this. We believe that JSON is fine without comments. - - We do not preserve the **insertion order of object elements**. The [JSON standard](https://tools.ietf.org/html/rfc7159.html) defines objects as "an unordered collection of zero or more name/value pairs". To this end, this library does not preserve insertion order of name/value pairs. (In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default.) Note this behavior conforms to the standard, and we shall not change it to any other order. If you do want to preserve the insertion order, you can specialize the object type with containers like [`tsl::ordered_map`](https://github.com/Tessil/ordered-map) or [`nlohmann::fifo_map`](https://github.com/nlohmann/fifo_map). + - We do not preserve the **insertion order of object elements**. The [JSON standard](https://tools.ietf.org/html/rfc8259.html) defines objects as "an unordered collection of zero or more name/value pairs". To this end, this library does not preserve insertion order of name/value pairs. (In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default.) Note this behavior conforms to the standard, and we shall not change it to any other order. If you do want to preserve the insertion order, you can specialize the object type with containers like [`tsl::ordered_map`](https://github.com/Tessil/ordered-map) or [`nlohmann::fifo_map`](https://github.com/nlohmann/fifo_map). - Please do not open pull requests that address **multiple issues**. diff --git a/doc/images/json_syntax_number.png b/doc/images/json_syntax_number.png new file mode 100644 index 0000000000000000000000000000000000000000..be23ffa69d02833fb3b109b6a8c3e50e9701e2ff GIT binary patch literal 37014 zcmeFZXIPWX(!h;$W@5>P;qE*%L)L%(T)(v{w;ihy(#2p}B{5PC^Osv-(P zr1!33=)HrK|0X=odEaxso&T5f;r)4C!0x@XGrP01Gqba^hTYdxIY)V!^2CV~=kBR0 zB2Jtj6F6~#oQ&i&_>z2a_A2;u(iNd1f1a7)>f5dQD)uR)EsyG%;WgAzlTHd0;l z^J{W*^XF6Ym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f54e7 100644 --- a/doc/mkdocs/Makefile +++ b/doc/mkdocs/Makefile @@ -12,7 +12,7 @@ prepare_files: clean # create subfolders mkdir docs/images docs/examples # copy images - cp -vr ../json.gif ../images/range-begin-end.svg ../images/range-rbegin-rend.svg ../images/callback_events.png docs/images + cp -vr ../json.gif ../images/range-begin-end.svg ../images/range-rbegin-rend.svg ../images/callback_events.png ../images/json_syntax_number.png docs/images # copy examples cp -vr ../examples/*.cpp ../examples/*.output docs/examples diff --git a/doc/mkdocs/docs/api/basic_json/array_t.md b/doc/mkdocs/docs/api/basic_json/array_t.md index 89e39dbf83..f84e645bcf 100644 --- a/doc/mkdocs/docs/api/basic_json/array_t.md +++ b/doc/mkdocs/docs/api/basic_json/array_t.md @@ -6,7 +6,7 @@ using array_t = ArrayType>; The type used to store JSON arrays. -[RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON arrays as follows: > An array is an ordered sequence of zero or more values. To store objects in C++, a type is defined by the template parameters explained below. @@ -35,7 +35,7 @@ std::vector< #### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the array's limit of nesting is not explicitly constrained. However, a maximum depth of nesting may be diff --git a/doc/mkdocs/docs/api/basic_json/boolean_t.md b/doc/mkdocs/docs/api/basic_json/boolean_t.md index 926a5f9f46..a611514104 100644 --- a/doc/mkdocs/docs/api/basic_json/boolean_t.md +++ b/doc/mkdocs/docs/api/basic_json/boolean_t.md @@ -6,7 +6,7 @@ using boolean_t = BooleanType; The type used to store JSON booleans. -[RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a type which differentiates the two literals +[RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two literals `#!json true` and `#!json false`. To store objects in C++, a type is defined by the template parameter `BooleanType` which chooses the type to use. diff --git a/doc/mkdocs/docs/api/basic_json/number_float_t.md b/doc/mkdocs/docs/api/basic_json/number_float_t.md index c6785eb260..0d0182b803 100644 --- a/doc/mkdocs/docs/api/basic_json/number_float_t.md +++ b/doc/mkdocs/docs/api/basic_json/number_float_t.md @@ -6,7 +6,7 @@ using number_float_t = NumberFloatType; The type used to store JSON numbers (floating-point). -[RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most programming languages. A number is represented in base > 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may > be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that @@ -35,7 +35,7 @@ With the default values for `NumberFloatType` (`double`), the default value for #### Limits -[RFC 7159](http://rfc7159.net/rfc7159) states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) states: > This specification allows implementations to set limits on the range and precision of numbers accepted. Since software > that implements IEEE 754-2008 binary64 (double precision) numbers is generally available and widely used, good > interoperability can be achieved by implementations that expect no more precision or range than these provide, in the diff --git a/doc/mkdocs/docs/api/basic_json/number_integer_t.md b/doc/mkdocs/docs/api/basic_json/number_integer_t.md index c10cb7803a..616b0b8a21 100644 --- a/doc/mkdocs/docs/api/basic_json/number_integer_t.md +++ b/doc/mkdocs/docs/api/basic_json/number_integer_t.md @@ -6,7 +6,7 @@ using number_integer_t = NumberIntegerType; The type used to store JSON numbers (integers). -[RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most programming languages. A number is represented in base > 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may > be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that @@ -36,7 +36,7 @@ With the default values for `NumberIntegerType` (`std::int64_t`), the default va #### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be stored is `9223372036854775807` (INT64_MAX) and @@ -44,7 +44,7 @@ the minimal integer number that can be stored is `-9223372036854775808` (INT64_M range will yield over/underflow when used in a constructor. During deserialization, too large or small integer numbers will be automatically be stored as [`number_unsigned_t`](number_unsigned_t.md) or [`number_float_t`](number_float_t.md). -[RFC 7159](http://rfc7159.net/rfc7159) further states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are > interoperable in the sense that implementations will agree exactly on their numeric values. diff --git a/doc/mkdocs/docs/api/basic_json/number_unsigned_t.md b/doc/mkdocs/docs/api/basic_json/number_unsigned_t.md index a28e25351f..49f0e31780 100644 --- a/doc/mkdocs/docs/api/basic_json/number_unsigned_t.md +++ b/doc/mkdocs/docs/api/basic_json/number_unsigned_t.md @@ -6,7 +6,7 @@ using number_unsigned_t = NumberUnsignedType; The type used to store JSON numbers (unsigned). -[RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most programming languages. A number is represented in base > 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may > be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that @@ -36,7 +36,7 @@ With the default values for `NumberUnsignedType` (`std::uint64_t`), the default #### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be stored is `18446744073709551615` (UINT64_MAX) and @@ -44,7 +44,7 @@ the minimal integer number that can be stored is `0`. Integer numbers that are o when used in a constructor. During deserialization, too large or small integer numbers will be automatically be stored as [`number_integer_t`](number_integer_t.md) or [`number_float_t`](number_float_t.md). -[RFC 7159](http://rfc7159.net/rfc7159) further states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are > interoperable in the sense that implementations will agree exactly on their numeric values. diff --git a/doc/mkdocs/docs/api/basic_json/object_t.md b/doc/mkdocs/docs/api/basic_json/object_t.md index efc18c41f3..e937d847ed 100644 --- a/doc/mkdocs/docs/api/basic_json/object_t.md +++ b/doc/mkdocs/docs/api/basic_json/object_t.md @@ -9,7 +9,7 @@ using object_t = ObjectType An object is an unordered collection of zero or more name/value pairs, where a name is a string and a value is a > string, number, boolean, null, object, or array. @@ -73,7 +73,7 @@ behavior: #### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the object's limit of nesting is not explicitly constrained. However, a maximum depth of nesting may be @@ -90,7 +90,7 @@ Objects are stored as pointers in a `basic_json` type. That is, for any access t The order name/value pairs are added to the object is *not* preserved by the library. Therefore, iterating an object may return name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default. Please note this behavior conforms to -[RFC 7159](http://rfc7159.net/rfc7159), because any order implements the specified "unordered" nature of JSON objects. +[RFC 8259](https://tools.ietf.org/html/rfc8259), because any order implements the specified "unordered" nature of JSON objects. ## Version history diff --git a/doc/mkdocs/docs/api/basic_json/string_t.md b/doc/mkdocs/docs/api/basic_json/string_t.md index acdd351b54..f6287f8949 100644 --- a/doc/mkdocs/docs/api/basic_json/string_t.md +++ b/doc/mkdocs/docs/api/basic_json/string_t.md @@ -6,7 +6,7 @@ using string_t = StringType; The type used to store JSON strings. -[RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON strings as follows: > A string is a sequence of zero or more Unicode characters. To store objects in C++, a type is defined by the template parameter described below. Unicode values are split by the @@ -31,7 +31,7 @@ the number of bytes in the string rather than the number of characters or glyphs #### String comparison -[RFC 7159](http://rfc7159.net/rfc7159) states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) states: > Software implementations are typically required to test names of object members for equality. Implementations that > transform the textual representation into sequences of Unicode code units and then perform the comparison numerically, > code unit by code unit, are interoperable in the sense that implementations will agree in all cases on equality or diff --git a/doc/mkdocs/docs/features/iterators.md b/doc/mkdocs/docs/features/iterators.md index a8b88e2d87..fd9d6791a6 100644 --- a/doc/mkdocs/docs/features/iterators.md +++ b/doc/mkdocs/docs/features/iterators.md @@ -10,7 +10,7 @@ As for other containers, `begin()` returns an iterator to the first value and `e ### Iteration order for objects -When iterating over objects, values are ordered with respect to the `object_comparator_t` type which defaults to `std::less`. See the [types documentation](types.md#key-order) for more information. +When iterating over objects, values are ordered with respect to the `object_comparator_t` type which defaults to `std::less`. See the [types documentation](types/index.md#key-order) for more information. ??? example diff --git a/doc/mkdocs/docs/features/types.md b/doc/mkdocs/docs/features/types/index.md similarity index 91% rename from doc/mkdocs/docs/features/types.md rename to doc/mkdocs/docs/features/types/index.md index 94e40cbaf3..b2da9a9111 100644 --- a/doc/mkdocs/docs/features/types.md +++ b/doc/mkdocs/docs/features/types/index.md @@ -1,4 +1,4 @@ -# Types +# Overview This page gives an overview how JSON values are stored and how this can be configured. @@ -107,7 +107,7 @@ using binary_t = nlohmann::byte_container_with_subtype; ## Objects -[RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON objects as follows: > An object is an unordered collection of zero or more name/value pairs, where a name is a string and a value is a string, number, boolean, null, object, or array. @@ -135,11 +135,11 @@ The choice of `object_t` influences the behavior of the JSON class. With the def ### Key order -The order name/value pairs are added to the object is *not* preserved by the library. Therefore, iterating an object may return name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default. Please note this behavior conforms to [RFC 7159](http://rfc7159.net/rfc7159), because any order implements the specified "unordered" nature of JSON objects. +The order name/value pairs are added to the object is *not* preserved by the library. Therefore, iterating an object may return name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default. Please note this behavior conforms to [RFC 8259](https://tools.ietf.org/html/rfc8259), because any order implements the specified "unordered" nature of JSON objects. ### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. @@ -152,7 +152,7 @@ Objects are stored as pointers in a `basic_json` type. That is, for any access t ## Arrays -[RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON arrays as follows: > An array is an ordered sequence of zero or more values. @@ -169,7 +169,7 @@ std::vector< ### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. @@ -182,7 +182,7 @@ Arrays are stored as pointers in a `basic_json` type. That is, for any access to ## Strings -[RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON strings as follows: > A string is a sequence of zero or more Unicode characters. @@ -198,7 +198,7 @@ Strings are stored in UTF-8 encoding. Therefore, functions like `std::string::si ### String comparison -[RFC 7159](http://rfc7159.net/rfc7159) states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) states: > Software implementations are typically required to test names of object members for equality. Implementations that transform the textual representation into sequences of Unicode code units and then perform the comparison numerically, code unit by code unit, are interoperable in the sense that implementations will agree in all cases on equality or inequality of two strings. For example, implementations that compare strings with escaped characters unconverted may incorrectly find that `"a\\b"` and `"a\u005Cb"` are not equal. @@ -211,7 +211,7 @@ String values are stored as pointers in a `basic_json` type. That is, for any ac ## Booleans -[RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a type which differentiates the two literals `true` and `false`. +[RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two literals `true` and `false`. ### Default type @@ -223,7 +223,9 @@ Boolean values are stored directly inside a `basic_json` type. ## Numbers -[RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: +See the [number handling](number_handling.md) article for a detailed discussion on how numbers are handled by this library. + +[RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most programming languages. A number is represented in base 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted. @@ -242,7 +244,7 @@ With the default values for *NumberFloatType* (`#!cpp double`), the default valu ### Limits -[RFC 7159](http://rfc7159.net/rfc7159) specifies: +[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. @@ -250,13 +252,13 @@ When the default type is used, the maximal integer number that can be stored is When the default type is used, the maximal unsigned integer number that can be stored is `#!c 18446744073709551615` (`UINT64_MAX`) and the minimal integer number that can be stored is `#!c 0`. Integer numbers that are out of range will yield over/underflow when used in a constructor. During deserialization, too large or small integer numbers will be automatically be stored as `number_integer_t` or `number_float_t`. -[RFC 7159](http://rfc7159.net/rfc7159) further states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are in the range $[-2^{53}+1, 2^{53}-1]$ are interoperable in the sense that implementations will agree exactly on their numeric values. As this range is a subrange of the exactly supported range [`INT64_MIN`, `INT64_MAX`], this class's integer type is interoperable. -[RFC 7159](http://rfc7159.net/rfc7159) states: +[RFC 8259](https://tools.ietf.org/html/rfc8259) states: > This specification allows implementations to set limits on the range and precision of numbers accepted. Since software that implements IEEE 754-2008 binary64 (double precision) numbers is generally available and widely used, good interoperability can be achieved by implementations that expect no more precision or range than these provide, in the sense that implementations will approximate JSON numbers within the expected precision. diff --git a/doc/mkdocs/docs/features/types/number_handling.md b/doc/mkdocs/docs/features/types/number_handling.md new file mode 100644 index 0000000000..4224c155b2 --- /dev/null +++ b/doc/mkdocs/docs/features/types/number_handling.md @@ -0,0 +1,313 @@ +# Number Handling + +This document describes how the library is handling numbers. + +## Background + +This section briefly summarizes how the JSON specification describes how numbers should be handled. + +### JSON number syntax + +JSON defines the syntax of numbers as follows: + +!!! quote "[RFC 8259](https://tools.ietf.org/html/rfc8259#section-6), Section 6" + + The representation of numbers is similar to that used in most + programming languages. A number is represented in base 10 using + decimal digits. It contains an integer component that may be + prefixed with an optional minus sign, which may be followed by a + fraction part and/or an exponent part. Leading zeros are not + allowed. + + A fraction part is a decimal point followed by one or more digits. + + An exponent part begins with the letter E in uppercase or lowercase, + which may be followed by a plus or minus sign. The E and optional + sign are followed by one or more digits. + +The following railroad diagram from [json.org](https://json.org) visualizes the number syntax: + +![Syntax for JSON numbers](../../images/json_syntax_number.png) + +### Number interoperability + +On number interoperability, the following remarks are made: + +!!! quote "[RFC 8259](https://tools.ietf.org/html/rfc8259#section-6), Section 6" + + This specification allows implementations to set limits on the range + and precision of numbers accepted. Since software that implements + IEEE 754 binary64 (double precision) numbers [IEEE754] is generally + available and widely used, good interoperability can be achieved by + implementations that expect no more precision or range than these + provide, in the sense that implementations will approximate JSON + numbers within the expected precision. A JSON number such as 1E400 + or 3.141592653589793238462643383279 may indicate potential + interoperability problems, since it suggests that the software that + created it expects receiving software to have greater capabilities + for numeric magnitude and precision than is widely available. + + Note that when such software is used, numbers that are integers and + are in the range $[-2^{53}+1, 2^{53}-1]$ are interoperable in the + sense that implementations will agree exactly on their numeric + values. + +## Library implementation + +This section describes how the above number specification is implemented by this library. + +### Number storage + +In the default [`json`](../../api/json.md) type, numbers are stored as `#!c std::uint64_t`, `#!c std::int64_t`, and +`#!c double`, respectively. Thereby, `#!c std::uint64_t` and `#!c std::int64_t` are used only if they can store the +number without loss of precision. If this is impossible (e.g., if the number is too large), the number is stored as +`#!c double`. + +!!! info "Notes" + + - Numbers with a decimal digit or scientific notation are always stored as `#!c double`. + - The number types can be changed, see [Template number types](#template-number-types). + - As of version 3.9.1, the conversion is realized by + [`std::strtoull`](https://en.cppreference.com/w/cpp/string/byte/strtoul), + [`std::strtoll`](https://en.cppreference.com/w/cpp/string/byte/strtol), and + [`std::strtod`](https://en.cppreference.com/w/cpp/string/byte/strtof), respectively. + +!!! example "Examples" + + - Integer `#!c -12345678912345789123456789` is smaller than `#!c INT64_MIN` and will be stored as floating-point + number `#!c -1.2345678912345788e+25`. + - Integer `#!c 1E3` will be stored as floating-point number `#!c 1000.0`. + +### Number limits + +- Any 64 bit signed or unsigned integer can be stored without loss of precision. +- Numbers exceeding the limits of `#!c double` (i.e., numbers that after conversion via +[`std::strtod`](https://en.cppreference.com/w/cpp/string/byte/strtof) are not satisfying +[`std::isfinite`](https://en.cppreference.com/w/cpp/numeric/math/isfinite) such as `#!c 1E400`) will throw exception +[`json.exception.out_of_range.406`](../../home/exceptions.md#jsonexceptionout_of_range406) during parsing. +- Floating-point numbers are rounded to the next number representable as `double`. For instance +`#!c 3.141592653589793238462643383279` is stored as [`0x400921fb54442d18`](https://float.exposed/0x400921fb54442d18). +This is the same behavior as the code `#!c double x = 3.141592653589793238462643383279;`. + +!!! success "Interoperability" + + - The library interoperable with respect to the specification, because its supported range $[-2^{63}, 2^{64}-1]$ is + larger than the described range $[-2^{53}+1, 2^{53}-1]$. + - All integers outside the range $[-2^{63}, 2^{64}-1]$, as well as floating-point numbers are stored as `double`. + This also concurs with the specification above. + +### Number serialization + +- Integer numbers are serialized as is; that is, no scientific notation is used. +- Floating-point numbers are serialized as specified by the `#!c %g` printf modifier with + [`std::numeric_limits::max_digits10`](https://en.cppreference.com/w/cpp/types/numeric_limits/max_digits10) + significant digits). The rationale is to use the shortest representation while still allow round-tripping. + +!!! hint "Notes regarding precision of floating-point numbers" + + As described above, floating-point numbers are rounded to the nearest double and serialized with the shortest + representation to allow round-tripping. This can yield confusing examples: + + - The serialization can have fewer decimal places than the input: `#!c 2555.5599999999999` will be serialized as + `#!c 2555.56`. The reverse can also be true. + - The serialization can be in scientific notation even if the input is not: `#!c 0.0000972439793401814` will be + serialized as `#!c 9.72439793401814e-05`. The reverse can also be true: `#!c 12345E-5` will be serialized as + `#!c 0.12345`. + - Conversions from `#!c float` to `#!c double` can also introduce rouding errors: + ```cpp + float f = 0.3; + json j = f; + std::cout << j << '\n'; + ``` + yields `#!c 0.30000001192092896`. + + All examples here can be reproduced by passing the original double value to + + ```cpp + std::printf("%.*g\n", std::numeric_limits::max_digits10, double_value); + ``` + +#### NaN handling + +NaN (not-a-number) cannot be expressed with the number syntax described above and are in fact explicitly excluded: + +!!! quote "[RFC 8259](https://tools.ietf.org/html/rfc8259#section-6), Section 6" + + Numeric values that cannot be represented in the grammar below (such + as Infinity and NaN) are not permitted. + +That is, there is no way to *parse* a NaN value. However, NaN values can be stored in a JSON value by assignment. + +This library serializes NaN values as `#!js null`. This corresponds to the behavior of JavaScript's +[`JSON.stringify`](https://www.w3schools.com/js/js_json_stringify.asp) function. + +!!! example + + The following example shows how a NaN value is stored in a `json` value. + + ```cpp + int main() + { + double val = std::numeric_limits::quiet_NaN(); + std::cout << "val=" << val << std::endl; + json j = val; + std::cout << "j=" << j.dump() << std::endl; + val = j; + std::cout << "val=" << val << std::endl; + } + ``` + + output: + + ``` + val=nan + j=null + val=nan + ``` + +### Number comparison + +Floating-point inside JSON values numbers are compared with `#!c json::number_float_t::operator==` which is +`#!c double::operator==` by default. + +!!! example "Alternative comparison functions" + + To compare floating-point while respecting an epsilon, an alternative + [comparison function](https://github.com/mariokonrad/marnav/blob/master/include/marnav/math/floatingpoint.hpp#L34-#L39) + could be used, for instance + + ```cpp + template::value, T>::type> + inline bool is_same(T a, T b, T epsilon = std::numeric_limits::epsilon()) noexcept + { + return std::abs(a - b) <= epsilon; + } + ``` + Or you can self-define an operator equal function like this: + + ```cpp + bool my_equal(const_reference lhs, const_reference rhs) + { + const auto lhs_type lhs.type(); + const auto rhs_type rhs.type(); + if (lhs_type == rhs_type) + { + switch(lhs_type) + { + // self_defined case + case value_t::number_float: + return std::abs(lhs - rhs) <= std::numeric_limits::epsilon(); + + // other cases remain the same with the original + ... + } + } + ... + } + ``` + + (see [#703](https://github.com/nlohmann/json/issues/703) for more information.) + +!!! note + + NaN values never compare equal to themselves or to other NaN values. See [#514](https://github.com/nlohmann/json/issues/514). + +### Number conversion + +Just like the C++ language itself, the `get` family of functions allows conversions between unsigned and signed +integers, and between integers and floating-point values to integers. This behavior may be surprising. + +!!! warning "Unconditional number conversions" + + ```cpp hl_lines="3" + double d = 42.3; // non-integer double value 42.3 + json jd = d; // stores double value 42.3 + std::int64_t i = jd.get(); // now i==42; no warning or error is produced + ``` + + Note the last line with throw a [`json.exception.type_error.302`](../../home/exceptions.md#jsonexceptiontype_error302) + exception if `jd` is not a numerical type, for instance a string. + +The rationale is twofold: + +1. JSON does not define a number type or precision (see [#json-specification](above)). +2. C++ also allows to silently convert between number types. + +!!! success "Conditional number conversion" + + The code above can be solved by explicitly checking the nature of the value with members such as + [`is_number_integer()`](../../api/basic_json/is_number_integer.md) or + [`is_number_unsigned()`](../../api/basic_json/is_number_unsigned.md): + + ```cpp hl_lines="2" + // check if jd is really integer-valued + if (jd.is_number_integer()) + { + // if so, do the conversion and use i + std::int64_t i = jd.get(); + // ... + } + else + { + // otherwise, take appropriate action + // ... + } + ``` + + Note this approach also has the advantage that it can react on non-numerical JSON value types such as strings. + + (Example taken from [#777](https://github.com/nlohmann/json/issues/777#issuecomment-459968458).) + +### Determine number types + +As the example in [Number conversion](#number_conversion) shows, there are different functions to determine the type of +the stored number: + +- [`is_number()`](../../api/basic_json/is_number.md) returns `#!c true` for any number type +- [`is_number_integer()`](../../api/basic_json/is_number_integer.md) returns `#!c true` for signed and unsigned integers +- [`is_number_unsigned()`](../../api/basic_json/is_number_unsigned.md) returns `#!c true` for unsigned integers only +- [`is_number_float()`](../../api/basic_json/is_number_float.md) returns `#!c true` for floating-point numbers +- [`type_name()`](../../api/basic_json/type_name.md) returns `#!c "number"` for any number type +- [`type()`](../../api/basic_json/type.md) returns an different enumerator of + [`value_t`](../../api/basic_json/value_t.md) for all number types + +| function | unsigned integer | signed integer | floating-point | string | +| -------- | ---------------- | -------------- | -------------- | ------ | +| [`is_number()`](../../api/basic_json/is_number.md) | `#!c true` | `#!c true` | `#!c true` | `#!c false` | +| [`is_number_integer()`](../../api/basic_json/is_number_integer.md) | `#!c true` | `#!c true` | `#!c false` | `#!c false` | +| [`is_number_unsigned()`](../../api/basic_json/is_number_unsigned.md) | `#!c true` | `#!c false` | `#!c false` | `#!c false` | +| [`is_number_float()`](../../api/basic_json/is_number_float.md) | `#!c false` | `#!c false` | `#!c true` | `#!c false` | +| [`type_name()`](../../api/basic_json/type_name.md) | `#!c "number"` | `#!c "number"` | `#!c "number"` | `#!c "string"` | +| [`type()`](../../api/basic_json/type.md) | `number_unsigned` | `number_integer` | `number_float` | `string` | + +### Template number types + +The number types can be changed with template parameters. + +| position | number type | default type | possible values | +| -------- | ----------- | ------------ | --------------- | +| 5 | signed integers | `#!c std::int64_t` | `#!c std::int32_t`, `#!c std::int16_t`, etc. | +| 6 | unsigned integers | `#!c std::uint64_t` | `#!c std::uint32_t`, `#!c std::uint16_t`, etc. | +| 7 | floating-point | `#!c double` | `#!c float`, `#!c long double` | + +!!! info "Constraints on number types" + + - The type for signed integers must be convertible from `#!c long long`. The type for floating-point numbers is used + in case of overflow. + - The type for unsigned integers must be convertible from `#!c unsigned long long`. The type for floating-point + numbers is used in case of overflow. + - The types for signed and unsigned integers must be distinct, see + [#2573](https://github.com/nlohmann/json/issues/2573). + - Only `#!c double`, `#!c float`, and `#!c long double` are supported for floating-point numbers. + +!!! example + + A `basic_json` type that uses `#!c long double` as floating-point type. + + ```cpp hl_lines="2" + using json_ld = nlohmann::basic_json; + ``` + + Note values should then be parsed with `json_ld::parse` rather than `json::parse` as the latter would parse + floating-point values to `#!c double` before then converting them to `#!c long double`. diff --git a/doc/mkdocs/docs/home/releases.md b/doc/mkdocs/docs/home/releases.md index 0cb890b0ae..298c3772bf 100644 --- a/doc/mkdocs/docs/home/releases.md +++ b/doc/mkdocs/docs/home/releases.md @@ -1167,7 +1167,7 @@ As `noexcept` and `constexpr` specifier have been added to several functions, th - Parser error messages are still very vague and contain no information on the error location. - The implemented `diff` function is rather primitive and does not create minimal diffs. - The name of function `iteration_wrapper` may change in the future and the function will be deprecated in the next release. -- Roundtripping (i.e., parsing a JSON value from a string, serializing it, and comparing the strings) of floating-point numbers is not 100% accurate. Note that [RFC 7159](https://tools.ietf.org/html/rfc7159) defines no format to internally represent numbers and states not requirement for roundtripping. Nevertheless, benchmarks like [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) treat roundtripping deviations as conformance errors. +- Roundtripping (i.e., parsing a JSON value from a string, serializing it, and comparing the strings) of floating-point numbers is not 100% accurate. Note that [RFC 8259](https://tools.ietf.org/html/rfc8259) defines no format to internally represent numbers and states not requirement for roundtripping. Nevertheless, benchmarks like [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) treat roundtripping deviations as conformance errors. ## v1.1.0 diff --git a/doc/mkdocs/mkdocs.yml b/doc/mkdocs/mkdocs.yml index e1552d39b8..b7ad380fe3 100644 --- a/doc/mkdocs/mkdocs.yml +++ b/doc/mkdocs/mkdocs.yml @@ -9,7 +9,7 @@ repo_url: https://github.com/nlohmann/json edit_uri: edit/develop/doc/mkdocs/docs # Copyright -copyright: Copyright © 2013 - 2020 Niels Lohmann +copyright: Copyright © 2013 - 2021 Niels Lohmann # Configuration theme: @@ -62,7 +62,9 @@ nav: - features/parsing/sax_interface.md - features/enum_conversion.md - features/macros.md - - features/types.md + - Types: + - features/types/index.md + - features/types/number_handling.md - Integration: - integration/index.md - integration/cmake.md diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index 7db2722619..3a47167e9c 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -231,7 +231,7 @@ class lexer : public lexer_base /*! @brief scan a string literal - This function scans a string according to Sect. 7 of RFC 7159. While + This function scans a string according to Sect. 7 of RFC 8259. While scanning, bytes are escaped and copied into buffer token_buffer. Then the function returns successfully, token_buffer is *not* null-terminated (as it may contain \0 bytes), and token_buffer.size() is the number of bytes in the @@ -921,10 +921,10 @@ class lexer : public lexer_base /*! @brief scan a number literal - This function scans a string according to Sect. 6 of RFC 7159. + This function scans a string according to Sect. 6 of RFC 8259. The function is realized with a deterministic finite state machine derived - from the grammar described in RFC 7159. Starting in state "init", the + from the grammar described in RFC 8259. Starting in state "init", the input is read and used to determined the next state. Only state "done" accepts the number. State "error" is a trap state to model errors. In the table below, "anything" means any character but the ones listed before. diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 337b64c9d8..0bbaa9503a 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -163,8 +163,8 @@ The invariants are checked by member function assert_invariant(). @note ObjectType trick from https://stackoverflow.com/a/9860911 @endinternal -@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange -Format](http://rfc7159.net/rfc7159) +@see [RFC 8259: The JavaScript Object Notation (JSON) Data Interchange +Format](https://tools.ietf.org/html/rfc8259) @since version 1.0.0 @@ -425,7 +425,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for an object - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON objects as follows: > An object is an unordered collection of zero or more name/value pairs, > where a name is a string and a value is a string, number, boolean, null, > object, or array. @@ -479,7 +479,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the object's limit of nesting is not explicitly constrained. @@ -502,7 +502,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default. Please note this behavior conforms to [RFC - 7159](http://rfc7159.net/rfc7159), because any order implements the + 8259](https://tools.ietf.org/html/rfc8259), because any order implements the specified "unordered" nature of JSON objects. */ using object_t = ObjectType An array is an ordered sequence of zero or more values. To store objects in C++, a type is defined by the template parameters @@ -538,7 +538,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the array's limit of nesting is not explicitly constrained. @@ -560,7 +560,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a string - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON strings as follows: > A string is a sequence of zero or more Unicode characters. To store objects in C++, a type is defined by the template parameter @@ -587,7 +587,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### String comparison - [RFC 7159](http://rfc7159.net/rfc7159) states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) states: > Software implementations are typically required to test names of object > members for equality. Implementations that transform the textual > representation into sequences of Unicode code units and then perform the @@ -613,7 +613,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a boolean - [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + [RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two literals `true` and `false`. To store objects in C++, a type is defined by the template parameter @a @@ -639,7 +639,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (integer) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -677,7 +677,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be @@ -688,7 +688,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec will be automatically be stored as @ref number_unsigned_t or @ref number_float_t. - [RFC 7159](http://rfc7159.net/rfc7159) further states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense > that implementations will agree exactly on their numeric values. @@ -711,7 +711,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (unsigned) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -749,7 +749,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be @@ -759,7 +759,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec deserialization, too large or small integer numbers will be automatically be stored as @ref number_integer_t or @ref number_float_t. - [RFC 7159](http://rfc7159.net/rfc7159) further states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense > that implementations will agree exactly on their numeric values. @@ -782,7 +782,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (floating-point) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -820,7 +820,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) states: > This specification allows implementations to set limits on the range and > precision of numbers accepted. Since software that implements IEEE > 754-2008 binary64 (double precision) numbers is generally available and diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 97f77b4faa..4ba979fd2e 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6649,7 +6649,7 @@ class lexer : public lexer_base /*! @brief scan a string literal - This function scans a string according to Sect. 7 of RFC 7159. While + This function scans a string according to Sect. 7 of RFC 8259. While scanning, bytes are escaped and copied into buffer token_buffer. Then the function returns successfully, token_buffer is *not* null-terminated (as it may contain \0 bytes), and token_buffer.size() is the number of bytes in the @@ -7339,10 +7339,10 @@ class lexer : public lexer_base /*! @brief scan a number literal - This function scans a string according to Sect. 6 of RFC 7159. + This function scans a string according to Sect. 6 of RFC 8259. The function is realized with a deterministic finite state machine derived - from the grammar described in RFC 7159. Starting in state "init", the + from the grammar described in RFC 8259. Starting in state "init", the input is read and used to determined the next state. Only state "done" accepts the number. State "error" is a trap state to model errors. In the table below, "anything" means any character but the ones listed before. @@ -17178,8 +17178,8 @@ The invariants are checked by member function assert_invariant(). @note ObjectType trick from https://stackoverflow.com/a/9860911 @endinternal -@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange -Format](http://rfc7159.net/rfc7159) +@see [RFC 8259: The JavaScript Object Notation (JSON) Data Interchange +Format](https://tools.ietf.org/html/rfc8259) @since version 1.0.0 @@ -17440,7 +17440,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for an object - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON objects as follows: > An object is an unordered collection of zero or more name/value pairs, > where a name is a string and a value is a string, number, boolean, null, > object, or array. @@ -17494,7 +17494,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the object's limit of nesting is not explicitly constrained. @@ -17517,7 +17517,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as `std::map` with `std::less` is used by default. Please note this behavior conforms to [RFC - 7159](http://rfc7159.net/rfc7159), because any order implements the + 8259](https://tools.ietf.org/html/rfc8259), because any order implements the specified "unordered" nature of JSON objects. */ using object_t = ObjectType An array is an ordered sequence of zero or more values. To store objects in C++, a type is defined by the template parameters @@ -17553,7 +17553,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the maximum depth of nesting. In this class, the array's limit of nesting is not explicitly constrained. @@ -17575,7 +17575,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a string - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes JSON strings as follows: > A string is a sequence of zero or more Unicode characters. To store objects in C++, a type is defined by the template parameter @@ -17602,7 +17602,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### String comparison - [RFC 7159](http://rfc7159.net/rfc7159) states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) states: > Software implementations are typically required to test names of object > members for equality. Implementations that transform the textual > representation into sequences of Unicode code units and then perform the @@ -17628,7 +17628,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a boolean - [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + [RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two literals `true` and `false`. To store objects in C++, a type is defined by the template parameter @a @@ -17654,7 +17654,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (integer) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -17692,7 +17692,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be @@ -17703,7 +17703,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec will be automatically be stored as @ref number_unsigned_t or @ref number_float_t. - [RFC 7159](http://rfc7159.net/rfc7159) further states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense > that implementations will agree exactly on their numeric values. @@ -17726,7 +17726,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (unsigned) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -17764,7 +17764,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) specifies: + [RFC 8259](https://tools.ietf.org/html/rfc8259) specifies: > An implementation may set limits on the range and precision of numbers. When the default type is used, the maximal integer number that can be @@ -17774,7 +17774,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec deserialization, too large or small integer numbers will be automatically be stored as @ref number_integer_t or @ref number_float_t. - [RFC 7159](http://rfc7159.net/rfc7159) further states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: > Note that when such software is used, numbers that are integers and are > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense > that implementations will agree exactly on their numeric values. @@ -17797,7 +17797,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /*! @brief a type for a number (floating-point) - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + [RFC 8259](https://tools.ietf.org/html/rfc8259) describes numbers as follows: > The representation of numbers is similar to that used in most > programming languages. A number is represented in base 10 using decimal > digits. It contains an integer component that may be prefixed with an @@ -17835,7 +17835,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec #### Limits - [RFC 7159](http://rfc7159.net/rfc7159) states: + [RFC 8259](https://tools.ietf.org/html/rfc8259) states: > This specification allows implementations to set limits on the range and > precision of numbers accepted. Since software that implements IEEE > 754-2008 binary64 (double precision) numbers is generally available and diff --git a/test/src/unit-class_parser.cpp b/test/src/unit-class_parser.cpp index 247d9d5fe5..b0cdb0b357 100644 --- a/test/src/unit-class_parser.cpp +++ b/test/src/unit-class_parser.cpp @@ -589,7 +589,7 @@ TEST_CASE("parser class") SECTION("edge cases") { - // From RFC7159, Section 6: + // From RFC8259, Section 6: // Note that when such software is used, numbers that are // integers and are in the range [-(2**53)+1, (2**53)-1] // are interoperable in the sense that implementations will @@ -603,7 +603,7 @@ TEST_CASE("parser class") SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64 bit integers) { - // While RFC7159, Section 6 specifies a preference for support + // While RFC8259, Section 6 specifies a preference for support // for ranges in range of IEEE 754-2008 binary64 (double precision) // this does not accommodate 64 bit integers without loss of accuracy. // As 64 bit integers are now widely used in software, it is desirable @@ -888,7 +888,7 @@ TEST_CASE("parser class") SECTION("edge cases") { - // From RFC7159, Section 6: + // From RFC8259, Section 6: // Note that when such software is used, numbers that are // integers and are in the range [-(2**53)+1, (2**53)-1] // are interoperable in the sense that implementations will @@ -902,7 +902,7 @@ TEST_CASE("parser class") SECTION("over the edge cases") // issue #178 - Integer conversion to unsigned (incorrect handling of 64 bit integers) { - // While RFC7159, Section 6 specifies a preference for support + // While RFC8259, Section 6 specifies a preference for support // for ranges in range of IEEE 754-2008 binary64 (double precision) // this does not accommodate 64 bit integers without loss of accuracy. // As 64 bit integers are now widely used in software, it is desirable diff --git a/test/src/unit-testsuites.cpp b/test/src/unit-testsuites.cpp index 96239987d7..8071d4c74a 100644 --- a/test/src/unit-testsuites.cpp +++ b/test/src/unit-testsuites.cpp @@ -418,9 +418,9 @@ TEST_CASE("json.org examples") } } -TEST_CASE("RFC 7159 examples") +TEST_CASE("RFC 8259 examples") { - // here, we list all JSON values from the RFC 7159 document + // here, we list all JSON values from the RFC 8259 document SECTION("7. Strings") {