diff --git a/README.md b/README.md index a6b23ba74..d8df7dbaa 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Thanks everyone! :construction: If you want to understand the **API** better, check out the [**API Reference**](https://json.nlohmann.me/api/basic_json/) or the [**Doxygen documentation**](https://json.nlohmann.me/doxygen/index.html). -:bug: If you found a **bug**, please check the [**FAQ**](https://json.nlohmann.me/home/faq/) if it is a known issue or the result of a design decision. Please also have a look at the [**issue list**](https://github.com/nlohmann/json/issues) before you [**create a new issue**](https://github.com/nlohmann/json/issues/new/choose). Please provide as many information as possible to help us understand and reproduce your issue. +:bug: If you found a **bug**, please check the [**FAQ**](https://json.nlohmann.me/home/faq/) if it is a known issue or the result of a design decision. Please also have a look at the [**issue list**](https://github.com/nlohmann/json/issues) before you [**create a new issue**](https://github.com/nlohmann/json/issues/new/choose). Please provide as much information as possible to help us understand and reproduce your issue. There is also a [**docset**](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B) for the documentation browsers [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), and [Zeal](https://zealdocs.org) that contains the full [documentation](https://json.nlohmann.me) as offline resource. @@ -228,7 +228,7 @@ json j_string = "this is a string"; // retrieve the string value auto cpp_string = j_string.get(); -// retrieve the string value (alternative when an variable already exists) +// retrieve the string value (alternative when a variable already exists) std::string cpp_string2; j_string.get_to(cpp_string2); @@ -537,7 +537,7 @@ json j_ummap(c_ummap); // only one entry for key "three" is used ### JSON Pointer and JSON Patch -The library supports **JSON Pointer** ([RFC 6901](https://tools.ietf.org/html/rfc6901)) as alternative means to address structured values. On top of this, **JSON Patch** ([RFC 6902](https://tools.ietf.org/html/rfc6902)) allows to describe differences between two JSON values - effectively allowing patch and diff operations known from Unix. +The library supports **JSON Pointer** ([RFC 6901](https://tools.ietf.org/html/rfc6901)) as alternative means to address structured values. On top of this, **JSON Patch** ([RFC 6902](https://tools.ietf.org/html/rfc6902)) allows describing differences between two JSON values - effectively allowing patch and diff operations known from Unix. ```cpp // a JSON value @@ -740,8 +740,8 @@ If you just want to serialize/deserialize some structs, the `to_json`/`from_json There are two macros to make your life easier as long as you (1) want to use a JSON object as serialization and (2) want to use the member variable names as object keys in that object: -- `NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(name, member1, member2, ...)` is to be defined inside of the namespace of the class/struct to create code for. -- `NLOHMANN_DEFINE_TYPE_INTRUSIVE(name, member1, member2, ...)` is to be defined inside of the class/struct to create code for. This macro can also access private members. +- `NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(name, member1, member2, ...)` is to be defined inside the namespace of the class/struct to create code for. +- `NLOHMANN_DEFINE_TYPE_INTRUSIVE(name, member1, member2, ...)` is to be defined inside the class/struct to create code for. This macro can also access private members. In both macros, the first parameter is the name of the class/struct, and all remaining parameters name the members. @@ -846,7 +846,7 @@ namespace nlohmann { return {j.get()}; } - // Here's the catch! You must provide a to_json method! Otherwise you + // Here's the catch! You must provide a to_json method! Otherwise, you // will not be able to convert move_only_type to json, since you fully // specialized adl_serializer on that type static void to_json(json& j, move_only_type t) { @@ -955,7 +955,7 @@ assert(jPi.get() == TS_INVALID ); ``` Just as in [Arbitrary Type Conversions](#arbitrary-types-conversions) above, -- `NLOHMANN_JSON_SERIALIZE_ENUM()` MUST be declared in your enum type's namespace (which can be the global namespace), or the library will not be able to locate it and it will default to integer serialization. +- `NLOHMANN_JSON_SERIALIZE_ENUM()` MUST be declared in your enum type's namespace (which can be the global namespace), or the library will not be able to locate it, and it will default to integer serialization. - It MUST be available (e.g., proper headers must be included) everywhere you use the conversions. Other Important points: @@ -964,7 +964,7 @@ Other Important points: ### Binary formats (BSON, CBOR, MessagePack, and UBJSON) -Though JSON is a ubiquitous data format, it is not a very compact format suitable for data exchange, for instance over a network. Hence, the library supportsĀ [BSON](https://bsonspec.org) (Binary JSON), [CBOR](https://cbor.io) (Concise Binary Object Representation), [MessagePack](https://msgpack.org), and [UBJSON](https://ubjson.org) (Universal Binary JSON Specification) to efficiently encode JSON values to byte vectors and to decode such vectors. +Though JSON is a ubiquitous data format, it is not a very compact format suitable for data exchange, for instance over a network. Hence, the library supports [BSON](https://bsonspec.org) (Binary JSON), [CBOR](https://cbor.io) (Concise Binary Object Representation), [MessagePack](https://msgpack.org), and [UBJSON](https://ubjson.org) (Universal Binary JSON Specification) to efficiently encode JSON values to byte vectors and to decode such vectors. ```cpp // create a JSON value @@ -1003,7 +1003,7 @@ std::vector v_ubjson = json::to_ubjson(j); json j_from_ubjson = json::from_ubjson(v_ubjson); ``` -The library also supports binary types from BSON, CBOR (byte strings), and MessagePack (bin, ext, fixext). They are stored by default as `std::vector` to be processed outside of the library. +The library also supports binary types from BSON, CBOR (byte strings), and MessagePack (bin, ext, fixext). They are stored by default as `std::vector` to be processed outside the library. ```cpp // CBOR byte string with payload 0xCAFE @@ -1246,7 +1246,7 @@ endif() If you are using the [Meson Build System](https://mesonbuild.com), add this source tree as a [meson subproject](https://mesonbuild.com/Subprojects.html#using-a-subproject). You may also use the `include.zip` published in this project's [Releases](https://github.com/nlohmann/json/releases) to reduce the size of the vendored source tree. Alternatively, you can get a wrap file by downloading it from [Meson WrapDB](https://wrapdb.mesonbuild.com/nlohmann_json), or simply use `meson wrap install nlohmann_json`. Please see the meson project for any issues regarding the packaging. -The provided meson.build can also be used as an alternative to cmake for installing `nlohmann_json` system-wide in which case a pkg-config file is installed. To use it, simply have your build system require the `nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly. +The provided `meson.build` can also be used as an alternative to cmake for installing `nlohmann_json` system-wide in which case a pkg-config file is installed. To use it, simply have your build system require the `nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly. If you are using [Conan](https://www.conan.io/) to manage your dependencies, merely add [`nlohmann_json/x.y.z`](https://conan.io/center/nlohmann_json) to your `conanfile`'s requires, where `x.y.z` is the release version you want to use. Please file issues [here](https://github.com/conan-io/conan-center-index/issues) if you experience problems with the packages. @@ -1262,7 +1262,7 @@ If you are using [cget](https://cget.readthedocs.io/en/latest/), you can install If you are using [CocoaPods](https://cocoapods.org), you can use the library by adding pod `"nlohmann_json", '~>3.1.2'` to your podfile (see [an example](https://bitbucket.org/benman/nlohmann_json-cocoapod/src/master/)). Please file issues [here](https://bitbucket.org/benman/nlohmann_json-cocoapod/issues?status=new&status=open). -If you are using [NuGet](https://www.nuget.org), you can use the package [nlohmann.json](https://www.nuget.org/packages/nlohmann.json/). Please check [this extensive description](https://github.com/nlohmann/json/issues/1132#issuecomment-452250255) on how to use the package. Please files issues [here](https://github.com/hnkb/nlohmann-json-nuget/issues). +If you are using [NuGet](https://www.nuget.org), you can use the package [nlohmann.json](https://www.nuget.org/packages/nlohmann.json/). Please check [this extensive description](https://github.com/nlohmann/json/issues/1132#issuecomment-452250255) on how to use the package. Please file issues [here](https://github.com/hnkb/nlohmann-json-nuget/issues). If you are using [conda](https://conda.io/), you can use the package [nlohmann_json](https://github.com/conda-forge/nlohmann_json-feedstock) from [conda-forge](https://conda-forge.org) executing `conda install -c conda-forge nlohmann_json`. Please file issues [here](https://github.com/conda-forge/nlohmann_json-feedstock/issues). @@ -1292,7 +1292,7 @@ If you are using bare Makefiles, you can use `pkg-config` to generate the includ pkg-config nlohmann_json --cflags ``` -Users of the Meson build system will also be able to use a system wide library, which will be found by `pkg-config`: +Users of the Meson build system will also be able to use a system-wide library, which will be found by `pkg-config`: ```meson json = dependency('nlohmann_json', required: true) @@ -1422,13 +1422,13 @@ I deeply appreciate the help of the following people. - [Markus Werle](https://github.com/daixtrose) fixed a typo. - [WebProdPP](https://github.com/WebProdPP) fixed a subtle error in a precondition check. - [Alex](https://github.com/leha-bot) noted an error in a code sample. -- [Tom de Geus](https://github.com/tdegeus) reported some warnings with ICC and helped fixing them. +- [Tom de Geus](https://github.com/tdegeus) reported some warnings with ICC and helped to fix them. - [Perry Kundert](https://github.com/pjkundert) simplified reading from input streams. - [Sonu Lohani](https://github.com/sonulohani) fixed a small compilation error. - [Jamie Seward](https://github.com/jseward) fixed all MSVC warnings. - [Nate Vargas](https://github.com/eld00d) added a Doxygen tag file. -- [pvleuven](https://github.com/pvleuven) helped fixing a warning in ICC. -- [Pavel](https://github.com/crea7or) helped fixing some warnings in MSVC. +- [pvleuven](https://github.com/pvleuven) helped to fix a warning in ICC. +- [Pavel](https://github.com/crea7or) helped to fix some warnings in MSVC. - [Jamie Seward](https://github.com/jseward) avoided unnecessary string copies in `find()` and `count()`. - [Mitja](https://github.com/Itja) fixed some typos. - [Jorrit Wronski](https://github.com/jowr) updated the Hunter package links. @@ -1471,7 +1471,7 @@ I deeply appreciate the help of the following people. - [Henry Schreiner](https://github.com/henryiii) added support for GCC 4.8. - [knilch](https://github.com/knilch0r) made sure the test suite does not stall when run in the wrong directory. - [Antonio Borondo](https://github.com/antonioborondo) fixed an MSVC 2017 warning. -- [Dan Gendreau](https://github.com/dgendreau) implemented the `NLOHMANN_JSON_SERIALIZE_ENUM` macro to quickly define a enum/JSON mapping. +- [Dan Gendreau](https://github.com/dgendreau) implemented the `NLOHMANN_JSON_SERIALIZE_ENUM` macro to quickly define an enum/JSON mapping. - [efp](https://github.com/efp) added line and column information to parse errors. - [julian-becker](https://github.com/julian-becker) added BSON support. - [Pratik Chowdhury](https://github.com/pratikpc) added support for structured bindings. @@ -1491,7 +1491,7 @@ I deeply appreciate the help of the following people. - [John-Mark](https://github.com/johnmarkwayve) noted a missing header. - [Vitaly Zaitsev](https://github.com/xvitaly) fixed compilation with GCC 9.0. - [Laurent Stacul](https://github.com/stac47) fixed compilation with GCC 9.0. -- [Ivor Wanders](https://github.com/iwanders) helped reducing the CMake requirement to version 3.1. +- [Ivor Wanders](https://github.com/iwanders) helped to reduce the CMake requirement to version 3.1. - [njlr](https://github.com/njlr) updated the Buckaroo instructions. - [Lion](https://github.com/lieff) fixed a compilation issue with GCC 7 on CentOS. - [Isaac Nickaein](https://github.com/nickaein) improved the integer serialization performance and implemented the `contains()` function. @@ -1505,7 +1505,7 @@ I deeply appreciate the help of the following people. - [Michele Caini](https://github.com/skypjack) fixed links in the README. - [Hani](https://github.com/hnkb) documented how to install the library with NuGet. - [Mark Beckwith](https://github.com/wythe) fixed a typo. -- [yann-morin-1998](https://github.com/yann-morin-1998) helped reducing the CMake requirement to version 3.1. +- [yann-morin-1998](https://github.com/yann-morin-1998) helped to reduce the CMake requirement to version 3.1. - [Konstantin Podsvirov](https://github.com/podsvirov) maintains a package for the MSYS2 software distro. - [remyabel](https://github.com/remyabel) added GNUInstallDirs to the CMake files. - [Taylor Howard](https://github.com/taylorhoward92) fixed a unit test. @@ -1623,7 +1623,7 @@ The library itself consists of a single header file licensed under the MIT licen - [**GitHub Changelog Generator**](https://github.com/skywinder/github-changelog-generator) to generate the [ChangeLog](https://github.com/nlohmann/json/blob/develop/ChangeLog.md) - [**Google Benchmark**](https://github.com/google/benchmark) to implement the benchmarks - [**Hedley**](https://nemequ.github.io/hedley/) to avoid re-inventing several compiler-agnostic feature macros -- [**lcov**](http://ltp.sourceforge.net/coverage/lcov.php) to process coverage information and create a HTML view +- [**lcov**](http://ltp.sourceforge.net/coverage/lcov.php) to process coverage information and create an HTML view - [**libFuzzer**](https://llvm.org/docs/LibFuzzer.html) to implement fuzz testing for OSS-Fuzz - [**OSS-Fuzz**](https://github.com/google/oss-fuzz) for continuous fuzz testing of the library ([project repository](https://github.com/google/oss-fuzz/tree/master/projects/json)) - [**Probot**](https://probot.github.io) for automating maintainer tasks such as closing stale issues, requesting missing information, or detecting toxic comments. @@ -1651,7 +1651,7 @@ The library supports **Unicode input** as follows: - Invalid surrogates (e.g., incomplete pairs such as `\uDEAD`) will yield parse errors. - The strings stored in the library are UTF-8 encoded. When using the default string type (`std::string`), note that its length/size functions return the number of stored bytes rather than the number of characters or glyphs. - When you store strings with different encodings in the library, calling [`dump()`](https://nlohmann.github.io/json/api/basic_json/dump/) may throw an exception unless `json::error_handler_t::replace` or `json::error_handler_t::ignore` are used as error handlers. -- To store wide strings (e.g., `std::wstring`), you need to convert them to a a UTF-8 encoded `std::string` before, see [an example](https://json.nlohmann.me/home/faq/#wide-string-handling). +- To store wide strings (e.g., `std::wstring`), you need to convert them to a UTF-8 encoded `std::string` before, see [an example](https://json.nlohmann.me/home/faq/#wide-string-handling). ### Comments in JSON @@ -1678,7 +1678,7 @@ If you do want to preserve the insertion order, you can try the type [`nlohmann: We checked with Valgrind and the Address Sanitizer (ASAN) that there are no memory leaks. -If you find that a parsing program with this library does not release memory, please consider the following case and it maybe unrelated to this library. +If you find that a parsing program with this library does not release memory, please consider the following case, and it may be unrelated to this library. **Your program is compiled with glibc.** There is a tunable threshold that glibc uses to decide whether to actually return memory to the system or whether to cache it for later reuse. If in your program you make lots of small allocations and those small allocations are not a contiguous block and are presumably below the threshold, then they will not get returned to the OS. Here is a related issue [#1924](https://github.com/nlohmann/json/issues/1924). @@ -1686,7 +1686,7 @@ Here is a related issue [#1924](https://github.com/nlohmann/json/issues/1924). ### Further notes - The code contains numerous debug **assertions** which can be switched off by defining the preprocessor macro `NDEBUG`, see the [documentation of `assert`](https://en.cppreference.com/w/cpp/error/assert). In particular, note [`operator[]`](https://nlohmann.github.io/json/api/basic_json/operator%5B%5D/) implements **unchecked access** for const objects: If the given key is not present, the behavior is undefined (think of a dereferenced null pointer) and yields an [assertion failure](https://github.com/nlohmann/json/issues/289) if assertions are switched on. If you are not sure whether an element in an object exists, use checked access with the [`at()` function](https://nlohmann.github.io/json/api/basic_json/at/). Furthermore, you can define `JSON_ASSERT(x)` to replace calls to `assert(x)`. -- As the exact type of a number is not defined in the [JSON specification](https://tools.ietf.org/html/rfc8259.html), this library tries to choose the best fitting C++ number type automatically. As a result, the type `double` may be used to store numbers which may yield [**floating-point exceptions**](https://github.com/nlohmann/json/issues/181) in certain rare situations if floating-point exceptions have been unmasked in the calling code. These exceptions are not caused by the library and need to be fixed in the calling code, such as by re-masking the exceptions prior to calling library functions. +- As the exact number type is not defined in the [JSON specification](https://tools.ietf.org/html/rfc8259.html), this library tries to choose the best fitting C++ number type automatically. As a result, the type `double` may be used to store numbers which may yield [**floating-point exceptions**](https://github.com/nlohmann/json/issues/181) in certain rare situations if floating-point exceptions have been unmasked in the calling code. These exceptions are not caused by the library and need to be fixed in the calling code, such as by re-masking the exceptions prior to calling library functions. - The code can be compiled without C++ **runtime type identification** features; that is, you can use the `-fno-rtti` compiler flag. - **Exceptions** are used widely within the library. They can, however, be switched off with either using the compiler flag `-fno-exceptions` or by defining the symbol `JSON_NOEXCEPTION`. In this case, exceptions are replaced by `abort()` calls. You can further control this behavior by defining `JSON_THROW_USER` (overriding `throw`), `JSON_TRY_USER` (overriding `try`), and `JSON_CATCH_USER` (overriding `catch`). Note that `JSON_THROW_USER` should leave the current scope (e.g., by throwing or aborting), as continuing after it may yield undefined behavior. Note the explanatory [`what()`](https://en.cppreference.com/w/cpp/error/exception/what) string of exceptions is not available for MSVC if exceptions are disabled, see [#2824](https://github.com/nlohmann/json/discussions/2824). diff --git a/doc/examples/at_json_pointer.cpp b/doc/examples/at_json_pointer.cpp index ed450f70d..f554d8533 100644 --- a/doc/examples/at_json_pointer.cpp +++ b/doc/examples/at_json_pointer.cpp @@ -60,7 +60,7 @@ int main() // out_of_range.401 try { - // try to use a an invalid array index + // try to use an invalid array index json::reference ref = j.at("/array/4"_json_pointer); } catch (json::out_of_range& e) @@ -82,7 +82,7 @@ int main() // out_of_range.403 try { - // try to use a JSON pointer to an nonexistent object key + // try to use a JSON pointer to a nonexistent object key json::const_reference ref = j.at("/foo"_json_pointer); } catch (json::out_of_range& e) diff --git a/doc/examples/at_json_pointer_const.cpp b/doc/examples/at_json_pointer_const.cpp index 6f2b2f5ed..3ac232b9f 100644 --- a/doc/examples/at_json_pointer_const.cpp +++ b/doc/examples/at_json_pointer_const.cpp @@ -36,7 +36,7 @@ int main() // out_of_range.401 try { - // try to use a an invalid array index + // try to use an invalid array index json::const_reference ref = j.at("/array/4"_json_pointer); } catch (json::out_of_range& e) @@ -58,7 +58,7 @@ int main() // out_of_range.403 try { - // try to use a JSON pointer to an nonexistent object key + // try to use a JSON pointer to a nonexistent object key json::const_reference ref = j.at("/foo"_json_pointer); } catch (json::out_of_range& e) diff --git a/doc/mkdocs/docs/api/basic_json/accept.md b/doc/mkdocs/docs/api/basic_json/accept.md index b18c5391a..bd49e6631 100644 --- a/doc/mkdocs/docs/api/basic_json/accept.md +++ b/doc/mkdocs/docs/api/basic_json/accept.md @@ -17,7 +17,7 @@ Checks whether the input is valid JSON. 1. Reads from a compatible input. 2. Reads from a pair of character iterators - The value_type of the iterator must be a integral type with size of 1, 2 or 4 bytes, which will be interpreted + The value_type of the iterator must be an integral type with size of 1, 2 or 4 bytes, which will be interpreted respectively as UTF-8, UTF-16 and UTF-32. Unlike the [`parse`](parse.md) function, this function neither throws an exception in case of invalid JSON input diff --git a/doc/mkdocs/docs/api/basic_json/at.md b/doc/mkdocs/docs/api/basic_json/at.md index 01e4d0a9c..488747d68 100644 --- a/doc/mkdocs/docs/api/basic_json/at.md +++ b/doc/mkdocs/docs/api/basic_json/at.md @@ -45,7 +45,7 @@ const_reference at(const json_pointer& ptr) const; 2. The function can throw the following exceptions: - Throws [`type_error.304`](../../home/exceptions.md#jsonexceptiontype_error304) if the JSON value is not an object; in this case, calling `at` with a key makes no sense. See example below. - - Throws [`out_of_range.403`](../../home/exceptions.md#jsonexceptionout_of_range403) if the key `key` is is not + - Throws [`out_of_range.403`](../../home/exceptions.md#jsonexceptionout_of_range403) if the key `key` is not stored in the object; that is, `find(key) == end()`. See example below. 3. The function can throw the following exceptions: - Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index in the passed diff --git a/doc/mkdocs/docs/api/basic_json/basic_json.md b/doc/mkdocs/docs/api/basic_json/basic_json.md index 582b65a87..04aa90253 100644 --- a/doc/mkdocs/docs/api/basic_json/basic_json.md +++ b/doc/mkdocs/docs/api/basic_json/basic_json.md @@ -201,7 +201,7 @@ basic_json(basic_json&& other) noexcept; `[first, last)` is undefined. - Throws [`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) if iterators `first` and `last` belong to a primitive type (number, boolean, or string), but `first` does not point to the first - element any more. In this case, the range `[first, last)` is undefined. See example code below. + element anymore. In this case, the range `[first, last)` is undefined. See example code below. - Throws [`invalid_iterator.206`](../../home/exceptions.md#jsonexceptioninvalid_iterator206) if iterators `first` and `last` belong to a `#!json null` value. In this case, the range `[first, last)` is undefined. 8. / diff --git a/doc/mkdocs/docs/api/basic_json/binary_t.md b/doc/mkdocs/docs/api/basic_json/binary_t.md index dedcfb207..469f99f61 100644 --- a/doc/mkdocs/docs/api/basic_json/binary_t.md +++ b/doc/mkdocs/docs/api/basic_json/binary_t.md @@ -19,7 +19,7 @@ via the helper type [byte_container_with_subtype](../byte_container_with_subtype [MessagePack's documentation on the bin type family](https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family) describes this type as: -> Bin format family stores an byte array in 2, 3, or 5 bytes of extra bytes in addition to the size of the byte array. +> Bin format family stores a byte array in 2, 3, or 5 bytes of extra bytes in addition to the size of the byte array. [BSON's specifications](http://bsonspec.org/spec.html) describe several binary types; however, this type is intended to represent the generic binary type which has the description: diff --git a/doc/mkdocs/docs/api/basic_json/dump.md b/doc/mkdocs/docs/api/basic_json/dump.md index c9fb2b1c2..d0e78cec5 100644 --- a/doc/mkdocs/docs/api/basic_json/dump.md +++ b/doc/mkdocs/docs/api/basic_json/dump.md @@ -28,7 +28,7 @@ and `ensure_ascii` parameters. : how to react on decoding errors; there are three possible values (see [`error_handler_t`](error_handler_t.md): `strict` (throws and exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences with U+FFFD), and `ignore` (ignore invalid UTF-8 sequences during serialization; all bytes are copied to the output - unchanged). + unchanged)). ## Return value diff --git a/doc/mkdocs/docs/api/basic_json/erase.md b/doc/mkdocs/docs/api/basic_json/erase.md index 81b9fa21a..4f032c4f7 100644 --- a/doc/mkdocs/docs/api/basic_json/erase.md +++ b/doc/mkdocs/docs/api/basic_json/erase.md @@ -17,7 +17,7 @@ void erase(const size_type idx); ``` 1. Removes an element from a JSON value specified by iterator `pos`. The iterator `pos` must be valid and - dereferenceable. Thus the `end()` iterator (which is valid, but is not dereferenceable) cannot be used as a value for + dereferenceable. Thus, the `end()` iterator (which is valid, but is not dereferenceable) cannot be used as a value for `pos`. If called on a primitive type other than `#!json null`, the resulting JSON value will be `#!json null`. @@ -107,8 +107,7 @@ Strong exception safety: if an exception occurs, the original value stays intact ## Notes -1. Invalidates iterators and references at or after the point of the - erase, including the `end()` iterator. +1. Invalidates iterators and references at or after the point of the `erase`, including the `end()` iterator. 2. / 3. References and iterators to the erased elements are invalidated. Other references and iterators are not affected. 4. / diff --git a/doc/mkdocs/docs/api/basic_json/get.md b/doc/mkdocs/docs/api/basic_json/get.md index 6cd663056..3ca4a237b 100644 --- a/doc/mkdocs/docs/api/basic_json/get.md +++ b/doc/mkdocs/docs/api/basic_json/get.md @@ -31,7 +31,7 @@ constexpr const PointerType get_ptr() const noexcept; return ret; ``` - This overloads is chosen if: + This overload is chosen if: - `ValueType` is not `basic_json`, - `json_serializer` has a `from_json()` method of the form @@ -48,7 +48,7 @@ constexpr const PointerType get_ptr() const noexcept; return JSONSerializer::from_json(*this); ``` - This overloads is chosen if: + This overload is chosen if: - `ValueType` is not `basic_json` and - `json_serializer` has a `from_json()` method of the form diff --git a/doc/mkdocs/docs/api/basic_json/get_to.md b/doc/mkdocs/docs/api/basic_json/get_to.md index 4a4395bc8..7af46a4c0 100644 --- a/doc/mkdocs/docs/api/basic_json/get_to.md +++ b/doc/mkdocs/docs/api/basic_json/get_to.md @@ -16,7 +16,7 @@ ValueType v; JSONSerializer::from_json(*this, v); ``` -This overloads is chosen if: +This overload is chosen if: - `ValueType` is not `basic_json`, - `json_serializer` has a `from_json()` method of the form `void from_json(const basic_json&, ValueType&)` diff --git a/doc/mkdocs/docs/api/basic_json/items.md b/doc/mkdocs/docs/api/basic_json/items.md index cb10e60a9..5e4483889 100644 --- a/doc/mkdocs/docs/api/basic_json/items.md +++ b/doc/mkdocs/docs/api/basic_json/items.md @@ -5,7 +5,7 @@ iteration_proxy items() noexcept; iteration_proxy items() const noexcept; ``` -This function allows to access `iterator::key()` and `iterator::value()` during range-based for loops. In these loops, a +This function allows accessing `iterator::key()` and `iterator::value()` during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator. For loop without `items()` function: @@ -36,7 +36,7 @@ for (auto& el : j_object.items()) } ``` -The `items()` function also allows to use +The `items()` function also allows using [structured bindings](https://en.cppreference.com/w/cpp/language/structured_binding) (C++17): ```cpp diff --git a/doc/mkdocs/docs/api/basic_json/operator+=.md b/doc/mkdocs/docs/api/basic_json/operator+=.md index fb3dc267e..9b5c9cc18 100644 --- a/doc/mkdocs/docs/api/basic_json/operator+=.md +++ b/doc/mkdocs/docs/api/basic_json/operator+=.md @@ -18,7 +18,7 @@ reference operator+=(initializer_list_t init); 2. Inserts the given element `val` to the JSON object. If the function is called on a JSON null value, an empty object is created before inserting `val`. -3. This function allows to use `operator+=` with an initializer list. In case +3. This function allows using `operator+=` with an initializer list. In case 1. the current value is an object, 2. the initializer list `init` contains only two elements, and diff --git a/doc/mkdocs/docs/api/basic_json/operator[].md b/doc/mkdocs/docs/api/basic_json/operator[].md index f72c0535d..81bcbdcfe 100644 --- a/doc/mkdocs/docs/api/basic_json/operator[].md +++ b/doc/mkdocs/docs/api/basic_json/operator[].md @@ -80,9 +80,9 @@ const_reference operator[](const json_pointer& ptr) const; In particular: - - If the JSON pointer points to an object key that does not exist, it is created an filled with a `#!json null` + - If the JSON pointer points to an object key that does not exist, it is created and filled with a `#!json null` value before a reference to it is returned. - - If the JSON pointer points to an array index that does not exist, it is created an filled with a `#!json null` + - If the JSON pointer points to an array index that does not exist, it is created and filled with a `#!json null` value before a reference to it is returned. All indices between the current maximum and the given index are also filled with `#!json null`. - The special value `-` is treated as a synonym for the index past the end. @@ -93,7 +93,7 @@ Strong exception safety: if an exception occurs, the original value stays intact ## Complexity -1. Constant if `idx` is in the range of the array. Otherwise linear in `idx - size()`. +1. Constant if `idx` is in the range of the array. Otherwise, linear in `idx - size()`. 2. Logarithmic in the size of the container. 3. Constant diff --git a/doc/mkdocs/docs/api/basic_json/patch.md b/doc/mkdocs/docs/api/basic_json/patch.md index 84e6e195d..f35985911 100644 --- a/doc/mkdocs/docs/api/basic_json/patch.md +++ b/doc/mkdocs/docs/api/basic_json/patch.md @@ -5,7 +5,7 @@ basic_json patch(const basic_json& json_patch) const; ``` [JSON Patch](http://jsonpatch.com) defines a JSON document structure for expressing a sequence of operations to apply to -a JSON) document. With this function, a JSON Patch is applied to the current JSON value by executing all operations from +a JSON document. With this function, a JSON Patch is applied to the current JSON value by executing all operations from the patch. ## Parameters diff --git a/doc/mkdocs/docs/api/basic_json/push_back.md b/doc/mkdocs/docs/api/basic_json/push_back.md index fc05ba96a..d24842409 100644 --- a/doc/mkdocs/docs/api/basic_json/push_back.md +++ b/doc/mkdocs/docs/api/basic_json/push_back.md @@ -18,7 +18,7 @@ void push_back(initializer_list_t init); 2. Inserts the given element `val` to the JSON object. If the function is called on a JSON null value, an empty object is created before inserting `val`. -3. This function allows to use `push_back` with an initializer list. In case +3. This function allows using `push_back` with an initializer list. In case 1. the current value is an object, 2. the initializer list `init` contains only two elements, and diff --git a/doc/mkdocs/docs/api/basic_json/sax_parse.md b/doc/mkdocs/docs/api/basic_json/sax_parse.md index 7a6dbad3c..570430125 100644 --- a/doc/mkdocs/docs/api/basic_json/sax_parse.md +++ b/doc/mkdocs/docs/api/basic_json/sax_parse.md @@ -23,7 +23,7 @@ Read from input and generate SAX events 1. Read from a compatible input. 2. Read from a pair of character iterators - The value_type of the iterator must be a integral type with size of 1, 2 or 4 bytes, which will be interpreted + The value_type of the iterator must be an integral type with size of 1, 2 or 4 bytes, which will be interpreted respectively as UTF-8, UTF-16 and UTF-32. The SAX event lister must follow the interface of `json_sax`. diff --git a/doc/mkdocs/docs/api/basic_json/type_name.md b/doc/mkdocs/docs/api/basic_json/type_name.md index b2cd69171..02b3e545b 100644 --- a/doc/mkdocs/docs/api/basic_json/type_name.md +++ b/doc/mkdocs/docs/api/basic_json/type_name.md @@ -9,7 +9,7 @@ wrong JSON type. ## Return value -a string representation of a the type ([`value_t`](value_t.md)): +a string representation of the type ([`value_t`](value_t.md)): Value type | return value -------------------------------------------------- | ------------------------- diff --git a/doc/mkdocs/docs/api/basic_json/update.md b/doc/mkdocs/docs/api/basic_json/update.md index 851417e87..63894c077 100644 --- a/doc/mkdocs/docs/api/basic_json/update.md +++ b/doc/mkdocs/docs/api/basic_json/update.md @@ -9,7 +9,7 @@ void update(const_iterator first, const_iterator last, bool merge_objects = fals ``` 1. Inserts all values from JSON object `j`. -2. Inserts all values from from range `[first, last)` +2. Inserts all values from range `[first, last)` When `merge_objects` is `#!c false` (default), existing keys are overwritten. When `merge_objects` is `#!c true`, recursively merges objects with common keys. diff --git a/doc/mkdocs/docs/features/arbitrary_types.md b/doc/mkdocs/docs/features/arbitrary_types.md index 423419130..fe80dc701 100644 --- a/doc/mkdocs/docs/features/arbitrary_types.md +++ b/doc/mkdocs/docs/features/arbitrary_types.md @@ -87,8 +87,8 @@ If you just want to serialize/deserialize some structs, the `to_json`/`from_json There are two macros to make your life easier as long as you (1) want to use a JSON object as serialization and (2) want to use the member variable names as object keys in that object: -- `NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(name, member1, member2, ...)` is to be defined inside of the namespace of the class/struct to create code for. -- `NLOHMANN_DEFINE_TYPE_INTRUSIVE(name, member1, member2, ...)` is to be defined inside of the class/struct to create code for. This macro can also access private members. +- `NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(name, member1, member2, ...)` is to be defined inside the namespace of the class/struct to create code for. +- `NLOHMANN_DEFINE_TYPE_INTRUSIVE(name, member1, member2, ...)` is to be defined inside the class/struct to create code for. This macro can also access private members. In both macros, the first parameter is the name of the class/struct, and all remaining parameters name the members. @@ -197,7 +197,7 @@ namespace nlohmann { return {j.get()}; } - // Here's the catch! You must provide a to_json method! Otherwise you + // Here's the catch! You must provide a to_json method! Otherwise, you // will not be able to convert move_only_type to json, since you fully // specialized adl_serializer on that type static void to_json(json& j, move_only_type t) { diff --git a/doc/mkdocs/docs/features/binary_formats/cbor.md b/doc/mkdocs/docs/features/binary_formats/cbor.md index a7a8fc002..a1824eb97 100644 --- a/doc/mkdocs/docs/features/binary_formats/cbor.md +++ b/doc/mkdocs/docs/features/binary_formats/cbor.md @@ -1,6 +1,7 @@ # CBOR -The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. +The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely +small code size, fairly small message size, and extensibility without the need for version negotiation. !!! abstract "References" diff --git a/doc/mkdocs/docs/features/element_access/checked_access.md b/doc/mkdocs/docs/features/element_access/checked_access.md index 19c75254d..fcbfed09c 100644 --- a/doc/mkdocs/docs/features/element_access/checked_access.md +++ b/doc/mkdocs/docs/features/element_access/checked_access.md @@ -27,7 +27,7 @@ The `#!cpp at()` member function performs checked access; that is, it returns a | `#!cpp j.at("hobbies").at(0)` | `#!json "hiking"` | | `#!cpp j.at("hobbies").at(1)` | `#!json "reading"` | -The return value is a reference, so it can be modify the original value. +The return value is a reference, so it can be modified by the original value. ??? example diff --git a/doc/mkdocs/docs/features/element_access/unchecked_access.md b/doc/mkdocs/docs/features/element_access/unchecked_access.md index fff7f2b32..81ddabd13 100644 --- a/doc/mkdocs/docs/features/element_access/unchecked_access.md +++ b/doc/mkdocs/docs/features/element_access/unchecked_access.md @@ -27,7 +27,7 @@ Elements in a JSON object and a JSON array can be accessed via `#!cpp operator[] | `#!cpp j["hobbies"][0]` | `#!json "hiking"` | | `#!cpp j["hobbies"][1]` | `#!json "reading"` | -The return value is a reference, so it can be modify the original value. In case the passed object key is non-existing, a `#!json null` value is inserted which can be immediately be overwritten. +The return value is a reference, so it can modify the original value. In case the passed object key is non-existing, a `#!json null` value is inserted which can be immediately be overwritten. ??? example diff --git a/doc/mkdocs/docs/features/enum_conversion.md b/doc/mkdocs/docs/features/enum_conversion.md index 1c1bb8032..8f474a702 100644 --- a/doc/mkdocs/docs/features/enum_conversion.md +++ b/doc/mkdocs/docs/features/enum_conversion.md @@ -1,6 +1,8 @@ # Specializing enum conversion -By default, enum values are serialized to JSON as integers. In some cases this could result in undesired behavior. If an enum is modified or re-ordered after data has been serialized to JSON, the later de-serialized JSON data may be undefined or a different enum value than was originally intended. +By default, enum values are serialized to JSON as integers. In some cases this could result in undesired behavior. If an +enum is modified or re-ordered after data has been serialized to JSON, the later de-serialized JSON data may be +undefined or a different enum value than was originally intended. It is possible to more precisely specify how a given enum is mapped to and from JSON as shown below: @@ -22,7 +24,8 @@ NLOHMANN_JSON_SERIALIZE_ENUM( TaskState, { }) ``` -The `NLOHMANN_JSON_SERIALIZE_ENUM()` macro declares a set of `to_json()` / `from_json()` functions for type `TaskState` while avoiding repetition and boilerplate serialization code. +The `NLOHMANN_JSON_SERIALIZE_ENUM()` macro declares a set of `to_json()` / `from_json()` functions for type `TaskState` +while avoiding repetition and boilerplate serialization code. ## Usage @@ -44,10 +47,13 @@ assert(jPi.get() == TS_INVALID ); Just as in [Arbitrary Type Conversions](#arbitrary-types-conversions) above, -- `NLOHMANN_JSON_SERIALIZE_ENUM()` MUST be declared in your enum type's namespace (which can be the global namespace), or the library will not be able to locate it and it will default to integer serialization. +- `NLOHMANN_JSON_SERIALIZE_ENUM()` MUST be declared in your enum type's namespace (which can be the global namespace), + or the library will not be able to locate it, and it will default to integer serialization. - It MUST be available (e.g., proper headers must be included) everywhere you use the conversions. Other Important points: -- When using `get()`, undefined JSON values will default to the first pair specified in your map. Select this default pair carefully. -- If an enum or JSON value is specified more than once in your map, the first matching occurrence from the top of the map will be returned when converting to or from JSON. +- When using `get()`, undefined JSON values will default to the first pair specified in your map. Select this + default pair carefully. +- If an enum or JSON value is specified more than once in your map, the first matching occurrence from the top of the + map will be returned when converting to or from JSON. diff --git a/doc/mkdocs/docs/features/iterators.md b/doc/mkdocs/docs/features/iterators.md index fd9d6791a..6f17d3b04 100644 --- a/doc/mkdocs/docs/features/iterators.md +++ b/doc/mkdocs/docs/features/iterators.md @@ -66,7 +66,7 @@ The JSON iterators have two member functions, `key()` and `value()` to access th ### Range-based for loops -C++11 allows to use range-based for loops to iterate over a container. +C++11 allows using range-based for loops to iterate over a container. ```cpp for (auto it : j_object) @@ -76,7 +76,7 @@ for (auto it : j_object) } ``` -For this reason, the `items()` function allows to access `iterator::key()` and `iterator::value()` during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator. +For this reason, the `items()` function allows accessing `iterator::key()` and `iterator::value()` during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator. ```cpp for (auto& el : j_object.items()) @@ -85,7 +85,7 @@ for (auto& el : j_object.items()) } ``` -The items() function also allows to use structured bindings (C++17): +The items() function also allows using structured bindings (C++17): ```cpp for (auto& [key, val] : j_object.items()) diff --git a/doc/mkdocs/docs/features/json_patch.md b/doc/mkdocs/docs/features/json_patch.md index 24cebdd98..88c731a2c 100644 --- a/doc/mkdocs/docs/features/json_patch.md +++ b/doc/mkdocs/docs/features/json_patch.md @@ -2,7 +2,9 @@ ## Patches -JSON Patch ([RFC 6902](https://tools.ietf.org/html/rfc6902)) defines a JSON document structure for expressing a sequence of operations to apply to a JSON) document. With the `patch` function, a JSON Patch is applied to the current JSON value by executing all operations from the patch. +JSON Patch ([RFC 6902](https://tools.ietf.org/html/rfc6902)) defines a JSON document structure for expressing a sequence +of operations to apply to a JSON document. With the `patch` function, a JSON Patch is applied to the current JSON value +by executing all operations from the patch. ??? example diff --git a/doc/mkdocs/docs/features/macros.md b/doc/mkdocs/docs/features/macros.md index 8b10ef1f3..512caea4e 100644 --- a/doc/mkdocs/docs/features/macros.md +++ b/doc/mkdocs/docs/features/macros.md @@ -80,7 +80,7 @@ Implicit conversions can also be controlled with the CMake option `JSON_Implicit This macro can be used to simplify the serialization/deserialization of types if (1) want to use a JSON object as serialization and (2) want to use the member variable names as object keys in that object. -The macro is to be defined inside of the class/struct to create code for. Unlike [`NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE`](#nlohmann_define_type_non_intrusivetype-member), it can access private members. +The macro is to be defined inside the class/struct to create code for. Unlike [`NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE`](#nlohmann_define_type_non_intrusivetype-member), it can access private members. The first parameter is the name of the class/struct, and all remaining parameters name the members. See [Simplify your life with macros](arbitrary_types.md#simplify-your-life-with-macros) for an example. @@ -89,7 +89,7 @@ See [Simplify your life with macros](arbitrary_types.md#simplify-your-life-with- This macro can be used to simplify the serialization/deserialization of types if (1) want to use a JSON object as serialization and (2) want to use the member variable names as object keys in that object. -The macro is to be defined inside of the namespace of the class/struct to create code for. Private members cannot be accessed. Use [`NLOHMANN_DEFINE_TYPE_INTRUSIVE`](#nlohmann_define_type_intrusivetype-member) in these scenarios. +The macro is to be defined inside the namespace of the class/struct to create code for. Private members cannot be accessed. Use [`NLOHMANN_DEFINE_TYPE_INTRUSIVE`](#nlohmann_define_type_intrusivetype-member) in these scenarios. The first parameter is the name of the class/struct, and all remaining parameters name the members. See [Simplify your life with macros](arbitrary_types.md#simplify-your-life-with-macros) for an example. diff --git a/doc/mkdocs/docs/features/types/number_handling.md b/doc/mkdocs/docs/features/types/number_handling.md index aa8df7ad8..4b0200ab7 100644 --- a/doc/mkdocs/docs/features/types/number_handling.md +++ b/doc/mkdocs/docs/features/types/number_handling.md @@ -80,7 +80,7 @@ number without loss of precision. If this is impossible (e.g., if the number is ### Number limits -- Any 64 bit signed or unsigned integer can be stored without loss of precision. +- 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 @@ -116,7 +116,7 @@ That is, `-0` is stored as a signed integer, but the serialization does not repr - 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. + significant digits. The rationale is to use the shortest representation while still allow round-tripping. !!! hint "Notes regarding precision of floating-point numbers" @@ -283,7 +283,7 @@ the stored number: - [`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 +- [`type()`](../../api/basic_json/type.md) returns a different enumerator of [`value_t`](../../api/basic_json/value_t.md) for all number types | function | unsigned integer | signed integer | floating-point | string | diff --git a/doc/mkdocs/docs/home/exceptions.md b/doc/mkdocs/docs/home/exceptions.md index a04b60f86..6ade4ede4 100644 --- a/doc/mkdocs/docs/home/exceptions.md +++ b/doc/mkdocs/docs/home/exceptions.md @@ -182,7 +182,7 @@ This error indicates a syntax error while deserializing a JSON text. The error m ### json.exception.parse_error.102 -JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +JSON uses the `\uxxxx` format to describe Unicode characters. Code points above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. !!! failure "Example message" @@ -661,7 +661,7 @@ The `update()` member functions can only be executed for certain JSON types. ### json.exception.type_error.313 -The `unflatten` function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +The `unflatten` function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well-defined. !!! failure "Example message" diff --git a/doc/mkdocs/docs/integration/package_managers.md b/doc/mkdocs/docs/integration/package_managers.md index a4eda83f6..d98005da9 100644 --- a/doc/mkdocs/docs/integration/package_managers.md +++ b/doc/mkdocs/docs/integration/package_managers.md @@ -54,7 +54,7 @@ instead. See [nlohmann-json](https://formulae.brew.sh/formula/nlohmann-json) for If you are using the [Meson Build System](http://mesonbuild.com), add this source tree as a [meson subproject](https://mesonbuild.com/Subprojects.html#using-a-subproject). You may also use the `include.zip` published in this project's [Releases](https://github.com/nlohmann/json/releases) to reduce the size of the vendored source tree. Alternatively, you can get a wrap file by downloading it from [Meson WrapDB](https://wrapdb.mesonbuild.com/nlohmann_json), or simply use `meson wrap install nlohmann_json`. Please see the meson project for any issues regarding the packaging. -The provided meson.build can also be used as an alternative to cmake for installing `nlohmann_json` system-wide in which case a pkg-config file is installed. To use it, simply have your build system require the `nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly. +The provided `meson.build` can also be used as an alternative to cmake for installing `nlohmann_json` system-wide in which case a pkg-config file is installed. To use it, simply have your build system require the `nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly. ## Conan @@ -152,7 +152,7 @@ If you are using [CocoaPods](https://cocoapods.org), you can use the library by ## NuGet -If you are using [NuGet](https://www.nuget.org), you can use the package [nlohmann.json](https://www.nuget.org/packages/nlohmann.json/). Please check [this extensive description](https://github.com/nlohmann/json/issues/1132#issuecomment-452250255) on how to use the package. Please files issues [here](https://github.com/hnkb/nlohmann-json-nuget/issues). +If you are using [NuGet](https://www.nuget.org), you can use the package [nlohmann.json](https://www.nuget.org/packages/nlohmann.json/). Please check [this extensive description](https://github.com/nlohmann/json/issues/1132#issuecomment-452250255) on how to use the package. Please file issues [here](https://github.com/hnkb/nlohmann-json-nuget/issues). ## Conda diff --git a/doc/mkdocs/docs/integration/pkg-config.md b/doc/mkdocs/docs/integration/pkg-config.md index 56f86444e..429d0dea9 100644 --- a/doc/mkdocs/docs/integration/pkg-config.md +++ b/doc/mkdocs/docs/integration/pkg-config.md @@ -6,7 +6,7 @@ If you are using bare Makefiles, you can use `pkg-config` to generate the includ pkg-config nlohmann_json --cflags ``` -Users of the [Meson build system](package_managers.md#meson) will also be able to use a system wide library, which will be found by `pkg-config`: +Users of the [Meson build system](package_managers.md#meson) will also be able to use a system-wide library, which will be found by `pkg-config`: ```meson json = dependency('nlohmann_json', required: true)