diff --git a/doc/mkdocs/docs/api/macros/json_assert.md b/doc/mkdocs/docs/api/macros/json_assert.md index cca7b1a9d..a093341a1 100644 --- a/doc/mkdocs/docs/api/macros/json_assert.md +++ b/doc/mkdocs/docs/api/macros/json_assert.md @@ -4,8 +4,7 @@ #define JSON_ASSERT(x) /* value */ ``` -This macro controls which code is executed for [runtime assertions](../../features/assertions.md) of the libraries. It -is set by the library, but can be overridden by defining it before including the library. +This macro controls which code is executed for [runtime assertions](../../features/assertions.md) of the library. ## Parameters diff --git a/doc/mkdocs/docs/api/macros/json_has_cpp_11.md b/doc/mkdocs/docs/api/macros/json_has_cpp_11.md index ddb813132..3bee84324 100644 --- a/doc/mkdocs/docs/api/macros/json_has_cpp_11.md +++ b/doc/mkdocs/docs/api/macros/json_has_cpp_11.md @@ -15,7 +15,7 @@ detected incorrectly. ## Default definition -The default value is detected based on the preprocessor macros `#!cpp __cplusplus`, `#!cpp _HAS_CXX17`, or +The default value is detected based on preprocessor macros such as `#!cpp __cplusplus`, `#!cpp _HAS_CXX17`, or `#!cpp _MSVC_LANG`. ## Notes diff --git a/doc/mkdocs/docs/api/macros/json_throw_user.md b/doc/mkdocs/docs/api/macros/json_throw_user.md index 40d8bf67a..e10db90e4 100644 --- a/doc/mkdocs/docs/api/macros/json_throw_user.md +++ b/doc/mkdocs/docs/api/macros/json_throw_user.md @@ -37,7 +37,7 @@ By default, the macros map to their respective C++ keywords: When exceptions are switched off, the `#!cpp try` block is executed unconditionally, and throwing exceptions is replaced by calling [`std::abort`](https://en.cppreference.com/w/cpp/utility/program/abort) to make reaching the -`cpp throw` branch abort the process. +`#!cpp throw` branch abort the process. ```cpp #define JSON_THROW_USER(exception) std::abort() diff --git a/doc/mkdocs/docs/api/macros/json_use_implicit_conversions.md b/doc/mkdocs/docs/api/macros/json_use_implicit_conversions.md index 833ad424c..9a3a1e203 100644 --- a/doc/mkdocs/docs/api/macros/json_use_implicit_conversions.md +++ b/doc/mkdocs/docs/api/macros/json_use_implicit_conversions.md @@ -11,7 +11,7 @@ sets `JSON_USE_IMPLICIT_CONVERSIONS` accordingly. ## Default definition -By default, implicit conversions are enabled +By default, implicit conversions are enabled. ```cpp #define JSON_USE_IMPLICIT_CONVERSIONS 1 diff --git a/doc/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md b/doc/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md index 972ada4b9..7269ef081 100644 --- a/doc/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md +++ b/doc/mkdocs/docs/api/macros/nlohmann_define_type_intrusive.md @@ -6,7 +6,7 @@ ``` These macros can be used to simplify the serialization/deserialization of types if you want to use a JSON object as -serialization and want to user the member variable names as object keys in that object. The macro is to be defined +serialization and want to use the member variable names as object keys in that object. The macro is to be defined **inside** the class/struct to create code for. Unlike [`NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE`](nlohmann_define_type_non_intrusive.md), it can access private members. The first parameter is the name of the class/struct, and all remaining parameters name the members. diff --git a/doc/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md b/doc/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md index 13119a5a3..7ed5a6b43 100644 --- a/doc/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md +++ b/doc/mkdocs/docs/api/macros/nlohmann_define_type_non_intrusive.md @@ -6,7 +6,7 @@ ``` These macros can be used to simplify the serialization/deserialization of types if you want to use a JSON object as -serialization and want to user the member variable names as object keys in that object. The macro is to be defined +serialization and want to use the member variable names as object keys in that object. The macro is to be defined **outside** the class/struct to create code for, but **inside** its namespace. Unlike [`NLOHMANN_DEFINE_TYPE_INTRUSIVE`](nlohmann_define_type_intrusive.md), it **cannot** access private members. The first parameter is the name of the class/struct, and all remaining parameters name the members. @@ -45,7 +45,7 @@ See examples below for the concrete generated code. 2. The macro must be used outside the type (class/struct). 3. The passed members must be public. -!!! warning "Implementation limit" +!!! warning "Implementation limits" - The current implementation is limited to at most 64 member variables. If you want to serialize/deserialize types with more than 64 member variables, you need to define the `to_json`/`from_json` functions manually. diff --git a/doc/mkdocs/docs/features/arbitrary_types.md b/doc/mkdocs/docs/features/arbitrary_types.md index 76e0eb3ce..806366725 100644 --- a/doc/mkdocs/docs/features/arbitrary_types.md +++ b/doc/mkdocs/docs/features/arbitrary_types.md @@ -94,9 +94,12 @@ There are four macros to make your life easier as long as you (1) want to use a In all macros, the first parameter is the name of the class/struct, and all remaining parameters name the members. You can read more docs about them starting from [here](macros.md#nlohmann_define_type_intrusivetype-member). -!!! info "Implementation limit" +!!! info "Implementation limits" - At most 64 member variables can be passed to these macros. + - The current macro implementations are limited to at most 64 member variables. If you want to serialize/deserialize + types with more than 64 member variables, you need to define the `to_json`/`from_json` functions manually. + - The macros only work for the [`nlohmann::json`](../api/json.md) type; other specializations such as + [`nlohmann::ordered_json`](../api/ordered_json.md) are currently unsupported. ??? example