mirror of
https://github.com/nlohmann/json.git
synced 2025-11-23 19:34:10 +08:00
chore: fix typos (#4921)
Signed-off-by: co63oc <co63oc@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
/* Demonstration of type error exception with diagnostic postions support enabled */
|
||||
/* Demonstration of type error exception with diagnostic positions support enabled */
|
||||
int main()
|
||||
{
|
||||
//Invalid json string - housenumber type must be int instead of string
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
/* Demonstration of type error exception with diagnostic postions support enabled */
|
||||
/* Demonstration of type error exception with diagnostic positions support enabled */
|
||||
int main()
|
||||
{
|
||||
//Invalid json string - housenumber type must be int instead of string
|
||||
|
||||
@@ -5,7 +5,7 @@ using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON poiner
|
||||
// create JSON pointer
|
||||
json::json_pointer ptr("/foo/bar/baz");
|
||||
|
||||
// write string representation to stream
|
||||
|
||||
@@ -10,5 +10,5 @@ int main()
|
||||
std::cout << "operator[]: " << j["uint64"] << '\n'
|
||||
<< "default value (int): " << j.value("uint64", 0) << '\n'
|
||||
<< "default value (uint64_t): " << j.value("uint64", std::uint64_t(0)) << '\n'
|
||||
<< "explict return value type: " << j.value<std::uint64_t>("uint64", 0) << '\n';
|
||||
<< "explicit return value type: " << j.value<std::uint64_t>("uint64", 0) << '\n';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
operator[]: 18446744073709551615
|
||||
default value (int): -1
|
||||
default value (uint64_t): 18446744073709551615
|
||||
explict return value type: 18446744073709551615
|
||||
explicit return value type: 18446744073709551615
|
||||
|
||||
@@ -115,7 +115,7 @@ The library uses the following mapping from JSON values types to BJData types ac
|
||||
}
|
||||
```
|
||||
|
||||
Likewise, when a JSON object in the above form is serialzed using
|
||||
Likewise, when a JSON object in the above form is serialized using
|
||||
[`to_bjdata`](../../api/basic_json/to_bjdata.md), it is automatically converted into a compact BJData ND-array. The
|
||||
only exception is, that when the 1-dimensional vector stored in `"_ArraySize_"` contains a single integer or two
|
||||
integers with one being 1, a regular 1-D optimized array is generated.
|
||||
|
||||
@@ -10,7 +10,7 @@ types.
|
||||
The complete default namespace name is derived as follows:
|
||||
|
||||
- The root namespace is always `nlohmann`.
|
||||
- The inline namespace starts with `json_abi` and is followed by serveral optional ABI tags according to the value of
|
||||
- The inline namespace starts with `json_abi` and is followed by several optional ABI tags according to the value of
|
||||
these ABI-affecting macros, in order:
|
||||
- [`JSON_DIAGNOSTICS`](../api/macros/json_diagnostics.md) defined non-zero appends `_diag`.
|
||||
- [`JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`](../api/macros/json_use_legacy_discarded_value_comparison.md)
|
||||
|
||||
@@ -251,7 +251,7 @@ http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a0a45fc74063
|
||||
- Fixed typos and broken links in README. #1417 #1423 #1425 #1451 #1455 #1491
|
||||
- Fixed documentation of parse function. #1473
|
||||
- Suppressed warning that cannot be fixed inside the library. #1401 #1468
|
||||
- Imroved package manager suppert:
|
||||
- Improved package manager suppert:
|
||||
- Updated Buckaroo instructions. #1495
|
||||
- Improved Meson support. #1463
|
||||
- Added Conda package manager documentation. #1430
|
||||
@@ -685,7 +685,7 @@ After almost a year, here is finally a new release of JSON for Modern C++, and i
|
||||
|
||||
This section describes changes that change the public API of the library and may require changes in code using a previous version of the library. In section "Moving from 2.x.x to 3.0.0" at the end of the release notes, we describe in detail how existing code needs to be changed.
|
||||
|
||||
- The library now uses [**user-defined exceptions**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970) instead of re-using those defined in `<stdexcept>` (#244). This not only allows to add more information to the exceptions (every exception now has an identifier, and parse errors contain the position of the error), but also to easily catch all library exceptions with a single `catch(json::exception)`.
|
||||
- The library now uses [**user-defined exceptions**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970) instead of reusing those defined in `<stdexcept>` (#244). This not only allows to add more information to the exceptions (every exception now has an identifier, and parse errors contain the position of the error), but also to easily catch all library exceptions with a single `catch(json::exception)`.
|
||||
- When strings with a different encoding as UTF-8 were stored in JSON values, their serialization could not be parsed by the library itself, as only UTF-8 is supported. To enforce this library limitation and improve consistency, **non-UTF-8 encoded strings now yield a `json::type_error` exception during serialization** (#838). The check for valid UTF-8 is realized with code from [Björn Hoehrmann](http://bjoern.hoehrmann.de/).
|
||||
- **NaN and infinity values can now be stored inside the JSON value** without throwing an exception. They are, however, still serialized as `null` (#388).
|
||||
- The library's iterator tag was changed from RandomAccessIterator to **[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator)** (#593). Supporting RandomAccessIterator was incorrect as it assumed an ordering of values in a JSON objects which are unordered by definition.
|
||||
@@ -1185,7 +1185,7 @@ As `noexcept` and `constexpr` specifier have been added to several functions, th
|
||||
This release fixes several small bugs and adds functionality in a backwards-compatible manner. Compared to the [last version (1.0.0)](https://github.com/nlohmann/json/releases/tag/v1.0.0), the following changes have been made:
|
||||
|
||||
### Changes
|
||||
- _Fixed_: **Floating-point numbers** are now serialized and deserialized properly such that rountripping works in more cases. [#185, #186, #190, #191, #194]
|
||||
- _Fixed_: **Floating-point numbers** are now serialized and deserialized properly such that roundtripping works in more cases. [#185, #186, #190, #191, #194]
|
||||
- _Added_: The code now contains **assertions** to detect undefined behavior during development. As the standard function `assert` is used, the assertions can be switched off by defining the preprocessor symbol `NDEBUG` during compilation. [#168]
|
||||
- _Added_: It is now possible to get a **reference** to the stored values via the newly added function `get_ref()`. [#128, #184]
|
||||
- _Fixed_: Access to object values via keys (**`operator[]`**) now works with all kind of string representations. [#171, #189]
|
||||
|
||||
@@ -38,7 +38,7 @@ When executed, this program should create output similar to
|
||||
formula: [**`nlohmann-json`**](https://formulae.brew.sh/formula/nlohmann-json)
|
||||
|
||||
- [](https://repology.org/project/nlohmann-json/versions)
|
||||
- :octicons-tag-24: Availalbe versions: current version and development version (with `--HEAD` parameter)
|
||||
- :octicons-tag-24: Available versions: current version and development version (with `--HEAD` parameter)
|
||||
- :octicons-rocket-24: The formula is updated with every release.
|
||||
- :octicons-person-24: Maintainer: Niels Lohmann
|
||||
- :octicons-file-24: File issues at the [Homebrew issue tracker](https://github.com/Homebrew/homebrew-core/issues)
|
||||
@@ -103,7 +103,7 @@ The header can be used directly in your code or via CMake.
|
||||
|
||||
wrap: **`nlohmann_json`**
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current version and select older versions (see
|
||||
- :octicons-tag-24: Available versions: current version and select older versions (see
|
||||
[WrapDB](https://mesonbuild.com/Wrapdb-projects.html))
|
||||
- :octicons-rocket-24: The package is update automatically from file
|
||||
[`meson.build`](https://github.com/nlohmann/json/blob/develop/meson.build).
|
||||
@@ -195,7 +195,7 @@ repository can be referenced within a `MODULE.bazel` by rules such as `archive_o
|
||||
recipe: [**`nlohmann_json`**](https://conan.io/center/recipes/nlohmann_json)
|
||||
|
||||
- [](https://repology.org/project/nlohmann-json/versions)
|
||||
- :octicons-tag-24: Availalbe versions: current version and older versions (see
|
||||
- :octicons-tag-24: Available versions: current version and older versions (see
|
||||
[Conan Center](https://conan.io/center/recipes/nlohmann_json))
|
||||
- :octicons-rocket-24: The package is update automatically via
|
||||
[this recipe](https://github.com/conan-io/conan-center-index/tree/master/recipes/nlohmann_json).
|
||||
@@ -241,7 +241,7 @@ requires, where `x.y.z` is the release version you want to use.
|
||||
package: [**`nlohmann-json`**](https://packages.spack.io/package.html?name=nlohmann-json)
|
||||
|
||||
- [](https://repology.org/project/nlohmann-json/versions)
|
||||
- :octicons-tag-24: Availalbe versions: current version and older versions (see
|
||||
- :octicons-tag-24: Available versions: current version and older versions (see
|
||||
[Spack package](https://packages.spack.io/package.html?name=nlohmann-json))
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-person-24: Maintainer: [Axel Huebl](https://github.com/ax3l)
|
||||
@@ -294,7 +294,7 @@ Please see the [Spack project](https://github.com/spack/spack) for any issues re
|
||||
|
||||
package: [**`nlohmann_json`**](https://hunter.readthedocs.io/en/latest/packages/pkg/nlohmann_json.html)
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current version and older versions (see
|
||||
- :octicons-tag-24: Available versions: current version and older versions (see
|
||||
[Hunter package](https://hunter.readthedocs.io/en/latest/packages/pkg/nlohmann_json.html))
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [Hunter issue tracker](https://github.com/cpp-pm/hunter/issues)
|
||||
@@ -342,7 +342,7 @@ Please see the Hunter project for any issues regarding the packaging.
|
||||
package: [**`nlohmann-json`**](https://github.com/Microsoft/vcpkg/tree/master/ports/nlohmann-json)
|
||||
|
||||
- [](https://repology.org/project/nlohmann-json/versions)
|
||||
- :octicons-tag-24: Availalbe versions: current version
|
||||
- :octicons-tag-24: Available versions: current version
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [vcpkg issue tracker](https://github.com/microsoft/vcpkg/issues)
|
||||
- :octicons-question-24: [vcpkg website](https://vcpkg.io/)
|
||||
@@ -387,7 +387,7 @@ and follow the then displayed descriptions. Please see the vcpkg project for any
|
||||
|
||||
package: [**`nlohmann/json`**](https://github.com/pfultz2/cget-recipes/blob/master/recipes/nlohmann/json/package.txt)
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current version and older versions
|
||||
- :octicons-tag-24: Available versions: current version and older versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [cget issue tracker](https://github.com/pfultz2/cget-recipes/issues)
|
||||
- :octicons-question-24: [cget website](https://cget.readthedocs.io/)
|
||||
@@ -438,7 +438,7 @@ installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nl
|
||||
|
||||
package: **`nlohmann/json`**
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current version and older versions
|
||||
- :octicons-tag-24: Available versions: current version and older versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [library issue tracker](https://github.com/nlohmann/json/issues)
|
||||
- :octicons-question-24: [Xcode documentation](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app)
|
||||
@@ -449,7 +449,7 @@ installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nl
|
||||
|
||||
package: [**`nlohmann.json`**](https://www.nuget.org/packages/nlohmann.json/)
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current and previous versions
|
||||
- :octicons-tag-24: Available versions: current and previous versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-person-24: Maintainer: [Hani Kaabi](https://github.com/hnkb)
|
||||
- :octicons-file-24: File issues at the [maintainer's issue tracker](https://github.com/hnkb/nlohmann-json-nuget/issues)
|
||||
@@ -583,7 +583,7 @@ more information.
|
||||
package: [**`nlohmann_json`**](https://anaconda.org/conda-forge/nlohmann_json)
|
||||
|
||||
- 
|
||||
- :octicons-tag-24: Availalbe versions: current and previous versions
|
||||
- :octicons-tag-24: Available versions: current and previous versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [feedstock's issue tracker](https://github.com/conda-forge/nlohmann_json-feedstock/issues)
|
||||
- :octicons-question-24: [Conda documentation](https://docs.conda.io/projects/conda/en/stable/user-guide/getting-started.html)
|
||||
@@ -640,7 +640,7 @@ If you are using [MSYS2](http://www.msys2.org/), you can use the [mingw-w64-nloh
|
||||
port: [**`nlohmann-json`**](https://ports.macports.org/port/nlohmann-json/)
|
||||
|
||||
- [](https://repology.org/project/nlohmann-json/versions)
|
||||
- :octicons-tag-24: Availalbe versions: current version
|
||||
- :octicons-tag-24: Available versions: current version
|
||||
- :octicons-rocket-24: The port is updated with every release.
|
||||
- :octicons-file-24: File issues at the [MacPorts issue tracker](https://trac.macports.org/newticket?port=nlohmann-json)
|
||||
- :octicons-question-24: [MacPorts website](https://www.macports.org)
|
||||
@@ -718,7 +718,7 @@ bdep new -t exe -l c++
|
||||
|
||||
package: **`gh:nlohmann/json`**
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current and previous versions
|
||||
- :octicons-tag-24: Available versions: current and previous versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [CPM.cmake issue tracker](https://github.com/cpm-cmake/CPM.cmake/issues)
|
||||
- :octicons-question-24: [CPM.cmake website](https://github.com/cpm-cmake/CPM.cmake)
|
||||
@@ -762,7 +762,7 @@ CPMAddPackage("gh:nlohmann/json@3.12.0")
|
||||
|
||||
package: [**`nlohmann_json`**](https://github.com/xmake-io/xmake-repo/blob/master/packages/n/nlohmann_json/xmake.lua)
|
||||
|
||||
- :octicons-tag-24: Availalbe versions: current and previous versions
|
||||
- :octicons-tag-24: Available versions: current and previous versions
|
||||
- :octicons-rocket-24: The package is updated with every release.
|
||||
- :octicons-file-24: File issues at the [xmake issue tracker](https://github.com/xmake-io/xmake-repo/issues)
|
||||
- :octicons-question-24: [xmake website](https://xmake.io/#/)
|
||||
|
||||
@@ -265,7 +265,7 @@ class HeaderRequestHandler(SimpleHTTPRequestHandler): # lgtm[py/missing-call-to-
|
||||
|
||||
def send_head(self):
|
||||
# check if the translated path matches a working tree
|
||||
# and fullfill the request; otherwise, send 404
|
||||
# and fulfill the request; otherwise, send 404
|
||||
path = self.translate_path(self.path)
|
||||
self.worktree = self.worktrees.find(path)
|
||||
if self.worktree is not None:
|
||||
|
||||
Reference in New Issue
Block a user