Skip to content

Commit

Permalink
Merge pull request #1923 from Coeur/typos
Browse files Browse the repository at this point in the history
Some typos
  • Loading branch information
nlohmann committed Feb 2, 2020
2 parents 6a6790a + 8d92ca8 commit 973c52d
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Note that this table only lists those exceptions thrown due to the type. For ins

<table>
<tr>
<th rowspan="2">group</td>
<th rowspan="2">function</td>
<th rowspan="2">group</th>
<th rowspan="2">function</th>
<th colspan="6">JSON value type</th>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion doc/scripts/send_to_wandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# 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)
Expand Down
2 changes: 1 addition & 1 deletion include/nlohmann/detail/input/binary_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion include/nlohmann/detail/input/input_adapters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool, int>(true, 0),
[&first](std::pair<bool, int> res, decltype(*first) val)
Expand Down
2 changes: 1 addition & 1 deletion include/nlohmann/detail/meta/detected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <nlohmann/detail/meta/void_t.hpp>

// http://en.cppreference.com/w/cpp/experimental/is_detected
// https://en.cppreference.com/w/cpp/experimental/is_detected
namespace nlohmann
{
namespace detail
Expand Down
2 changes: 1 addition & 1 deletion include/nlohmann/detail/value_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/*!
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ and `from_json()` (@ref adl_serializer by default)
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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
// #include <nlohmann/detail/meta/void_t.hpp>


// http://en.cppreference.com/w/cpp/experimental/is_detected
// https://en.cppreference.com/w/cpp/experimental/is_detected
namespace nlohmann
{
namespace detail
Expand Down Expand Up @@ -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
};

/*!
Expand Down Expand Up @@ -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<bool, int>(true, 0),
[&first](std::pair<bool, int> res, decltype(*first) val)
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -14694,7 +14694,7 @@ and `from_json()` (@ref adl_serializer by default)
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/src/unit-class_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions test/src/unit-testsuites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down Expand Up @@ -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")
{
Expand Down Expand Up @@ -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(' ');
Expand Down

0 comments on commit 973c52d

Please sign in to comment.