diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5d9d51d6b..4d5ee0440 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # JSON for Modern C++ has been originally written by Niels Lohmann. # Since 2013 over 140 contributors have helped to improve the library. -# This CODEOWNERS file is only to make sure that @nlohmann is requsted +# This CODEOWNERS file is only to make sure that @nlohmann is requested # for a code review in case of a pull request. * @nlohmann diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2287cad47..724667c92 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -56,7 +56,7 @@ To make changes, you need to edit the following files: - The C++11 support varies between different **compilers** and versions. Please note the [list of supported compilers](https://github.com/nlohmann/json/blob/master/README.md#supported-compilers). Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with `#ifdef`s or other means. - 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](http://json.org) conformance**. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension. +- 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). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f2c3af6a8..5f303a6e0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,5 +15,5 @@ Read the [Contribution Guidelines](https://github.com/nlohmann/json/blob/develop - The C++11 support varies between different **compilers** and versions. Please note the [list of supported compilers](https://github.com/nlohmann/json/blob/master/README.md#supported-compilers). Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with `#ifdef`s or other means. - 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](http://json.org) conformance**. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension. +- 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. - Please do not open pull requests that address **multiple issues**. diff --git a/README.md b/README.md index 14187b0ad..ff2e51cb9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ ## Design goals -There are myriads of [JSON](http://json.org) libraries out there, and each may even have its reason to exist. Our class had these design goals: +There are myriads of [JSON](https://json.org) libraries out there, and each may even have its reason to exist. Our class had these design goals: - **Intuitive syntax**. In languages such as Python, JSON feels like a first class data type. We used all the operator magic of modern C++ to achieve the same feeling in your code. Check out the [examples below](#examples) and you'll know what I mean. @@ -1318,7 +1318,7 @@ The library itself consists of a single header file licensed under the MIT licen - [**AppVeyor**](https://www.appveyor.com) for [continuous integration](https://ci.appveyor.com/project/nlohmann/json) on Windows - [**Artistic Style**](http://astyle.sourceforge.net) for automatic source code indentation - [**CircleCI**](http://circleci.com) for [continuous integration](https://circleci.com/gh/nlohmann/json). -- [**Clang**](http://clang.llvm.org) for compilation with code sanitizers +- [**Clang**](https://clang.llvm.org) for compilation with code sanitizers - [**CMake**](https://cmake.org) for build automation - [**Codacity**](https://www.codacy.com) for further [code analysis](https://www.codacy.com/app/nlohmann/json) - [**Coveralls**](https://coveralls.io) to measure [code coverage](https://coveralls.io/github/nlohmann/json) diff --git a/doc/index.md b/doc/index.md index 353ddb7bc..f2de2e3a7 100644 --- a/doc/index.md +++ b/doc/index.md @@ -80,8 +80,8 @@ Note that this table only lists those exceptions thrown due to the type. For ins - + diff --git a/doc/scripts/send_to_wandbox.py b/doc/scripts/send_to_wandbox.py index 0158fb16a..eeef6a810 100755 --- a/doc/scripts/send_to_wandbox.py +++ b/doc/scripts/send_to_wandbox.py @@ -24,7 +24,7 @@ import urllib2 # Strips C and C++ comments from the given string. # -# Copied from http://stackoverflow.com/a/241506/627587. +# Copied from https://stackoverflow.com/a/241506/627587. def strip_comments(text): def replacer(match): s = match.group(0) diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 1b6e0f9b7..25c51fc00 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -123,7 +123,7 @@ class binary_reader @return true if and only if system's byte order is little endian - @note from http://stackoverflow.com/a/1001328/266378 + @note from https://stackoverflow.com/a/1001328/266378 */ static constexpr bool little_endianess(int num = 1) noexcept { diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp index 9512a771e..92f0608e9 100644 --- a/include/nlohmann/detail/input/input_adapters.hpp +++ b/include/nlohmann/detail/input/input_adapters.hpp @@ -387,7 +387,7 @@ class input_adapter { #ifndef NDEBUG // assertion to check that the iterator range is indeed contiguous, - // see http://stackoverflow.com/a/35008842/266378 for more discussion + // see https://stackoverflow.com/a/35008842/266378 for more discussion const auto is_contiguous = std::accumulate( first, last, std::pair(true, 0), [&first](std::pair res, decltype(*first) val) diff --git a/include/nlohmann/detail/meta/detected.hpp b/include/nlohmann/detail/meta/detected.hpp index 5b52460ac..e5ca5eb2e 100644 --- a/include/nlohmann/detail/meta/detected.hpp +++ b/include/nlohmann/detail/meta/detected.hpp @@ -4,7 +4,7 @@ #include -// http://en.cppreference.com/w/cpp/experimental/is_detected +// https://en.cppreference.com/w/cpp/experimental/is_detected namespace nlohmann { namespace detail diff --git a/include/nlohmann/detail/value_t.hpp b/include/nlohmann/detail/value_t.hpp index c4552df91..301fbe003 100644 --- a/include/nlohmann/detail/value_t.hpp +++ b/include/nlohmann/detail/value_t.hpp @@ -48,7 +48,7 @@ enum class value_t : std::uint8_t number_integer, ///< number value (signed integer) number_unsigned, ///< number value (unsigned integer) number_float, ///< number value (floating-point) - discarded ///< discarded by the the parser callback function + discarded ///< discarded by the parser callback function }; /*! diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 104b1d5f6..b72410d71 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -151,7 +151,7 @@ relationship: The invariants are checked by member function assert_invariant(). @internal -@note ObjectType trick from http://stackoverflow.com/a/9860911 +@note ObjectType trick from https://stackoverflow.com/a/9860911 @endinternal @see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange @@ -7335,7 +7335,7 @@ class basic_json Uses a JSON pointer to retrieve a reference to the respective JSON value. No bound checking is performed. The function does not change the JSON - value; no `null` values are created. In particular, the the special value + value; no `null` values are created. In particular, the special value `-` yields an exception. @param[in] ptr JSON pointer to the desired element diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index c2d4c98a7..77bd1739c 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2328,7 +2328,7 @@ struct iterator_traits::value>> // #include -// http://en.cppreference.com/w/cpp/experimental/is_detected +// https://en.cppreference.com/w/cpp/experimental/is_detected namespace nlohmann { namespace detail @@ -2861,7 +2861,7 @@ enum class value_t : std::uint8_t number_integer, ///< number value (signed integer) number_unsigned, ///< number value (unsigned integer) number_float, ///< number value (floating-point) - discarded ///< discarded by the the parser callback function + discarded ///< discarded by the parser callback function }; /*! @@ -4250,7 +4250,7 @@ class input_adapter { #ifndef NDEBUG // assertion to check that the iterator range is indeed contiguous, - // see http://stackoverflow.com/a/35008842/266378 for more discussion + // see https://stackoverflow.com/a/35008842/266378 for more discussion const auto is_contiguous = std::accumulate( first, last, std::pair(true, 0), [&first](std::pair res, decltype(*first) val) @@ -5263,7 +5263,7 @@ class binary_reader @return true if and only if system's byte order is little endian - @note from http://stackoverflow.com/a/1001328/266378 + @note from https://stackoverflow.com/a/1001328/266378 */ static constexpr bool little_endianess(int num = 1) noexcept { @@ -14694,7 +14694,7 @@ relationship: The invariants are checked by member function assert_invariant(). @internal -@note ObjectType trick from http://stackoverflow.com/a/9860911 +@note ObjectType trick from https://stackoverflow.com/a/9860911 @endinternal @see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange @@ -21878,7 +21878,7 @@ class basic_json Uses a JSON pointer to retrieve a reference to the respective JSON value. No bound checking is performed. The function does not change the JSON - value; no `null` values are created. In particular, the the special value + value; no `null` values are created. In particular, the special value `-` yields an exception. @param[in] ptr JSON pointer to the desired element diff --git a/test/src/unit-class_parser.cpp b/test/src/unit-class_parser.cpp index d4efa2071..88438a4d1 100644 --- a/test/src/unit-class_parser.cpp +++ b/test/src/unit-class_parser.cpp @@ -1426,7 +1426,7 @@ TEST_CASE("parser class") SECTION("tests found by mutate++") { - // test case to make sure no comma preceeds the first key + // test case to make sure no comma precedes the first key CHECK_THROWS_AS(parser_helper("{,\"key\": false}"), json::parse_error&); CHECK_THROWS_WITH(parser_helper("{,\"key\": false}"), "[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing object key - unexpected ','; expected string literal"); diff --git a/test/src/unit-testsuites.cpp b/test/src/unit-testsuites.cpp index e87ac44cf..4ee1bfeb5 100644 --- a/test/src/unit-testsuites.cpp +++ b/test/src/unit-testsuites.cpp @@ -36,7 +36,7 @@ using nlohmann::json; TEST_CASE("compliance tests from json.org") { - // test cases are from http://json.org/JSON_checker/ + // test cases are from https://json.org/JSON_checker/ SECTION("expected failures") { @@ -349,7 +349,7 @@ TEST_CASE("test suite from json-test-suite") TEST_CASE("json.org examples") { - // here, we list all JSON values from http://json.org/example + // here, we list all JSON values from https://json.org/example SECTION("1.json") { @@ -1361,7 +1361,7 @@ namespace { std::string trim(const std::string& str); -// from http://stackoverflow.com/a/25829178/266378 +// from https://stackoverflow.com/a/25829178/266378 std::string trim(const std::string& str) { size_t first = str.find_first_not_of(' ');
group - function + groupfunction JSON value type