* ✏️ fix typos

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* ✏️ address review comments

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* ✏️ address review comments

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2025-05-04 10:28:24 +02:00
committed by GitHub
parent 0a8b48ac6a
commit 9110918cf8
42 changed files with 329 additions and 325 deletions
@@ -79,7 +79,7 @@ template<typename BasicJsonType>
void from_json(const BasicJsonType&, type&);
```
Macros 3 and 6 add one function to the namespace which takes care of the serialization only:
Macros 3 and 6 add one function to the namespace, which takes care of the serialization only:
```cpp
template<typename BasicJsonType>
@@ -46,7 +46,7 @@ template<typename BasicJsonType>
friend void from_json(const BasicJsonType&, type&); // except (3)
```
See examples below for the concrete generated code.
See the examples below for the concrete generated code.
## Notes
@@ -46,7 +46,7 @@ template<typename BasicJsonType>
void from_json(const BasicJsonType&, type&); // except (3)
```
See examples below for the concrete generated code.
See the examples below for the concrete generated code.
## Notes
@@ -4,8 +4,8 @@
#define NLOHMANN_JSON_SERIALIZE_ENUM(type, 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 deserialized JSON data may be
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 deserialized JSON data may be
undefined or a different enum value than was originally intended.
The `NLOHMANN_JSON_SERIALIZE_ENUM` allows to define a user-defined serialization for every enumerator.