Commit 8d92ca86 authored by Antoine Cœur's avatar Antoine Cœur
Browse files

Some typos

parent 6a6790ab
# 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
......@@ -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).
......
......@@ -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**.
......@@ -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)
......
......@@ -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>
......
......@@ -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)
......
......@@ -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
{
......
......@@ -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)
......
......@@ -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
......
......@@ -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
};
/*!
......
......@@ -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
......
......@@ -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
......@@ -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<bool, int>(true, 0),
[&first](std::pair<bool, int> 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
......
......@@ -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");
......
......@@ -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(' ');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment