-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4abc2ed
commit 04ac341
Showing
9 changed files
with
103 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nlohmann::json_v3_11_1 | ||
nlohmann::nlohmann_json::v3_11_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <iostream> | ||
|
||
#define NLOHMANN_JSON_NAMESPACE_EXCLUDE_VERSION 1 | ||
#include <nlohmann/json.hpp> | ||
|
||
// macro needed to output the NLOHMANN_JSON_NAMESPACE as string literal | ||
#define Q(x) #x | ||
#define QUOTE(x) Q(x) | ||
|
||
int main() | ||
{ | ||
std::cout << QUOTE(NLOHMANN_JSON_NAMESPACE) << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nlohmann::nlohmann_json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
docs/mkdocs/docs/api/macros/nlohmann_json_namespace_exclude_version.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# NLOHMANN_JSON_NAMESPACE | ||
|
||
```cpp | ||
#define NLOHMANN_JSON_NAMESPACE_EXCLUDE_VERSION /* value */ | ||
``` | ||
If defined to `1`, the version namespace is omitted. See [`NLOHMANN_JSON_NAMESPACE`](nlohmann_json_namespace.md) for | ||
an explanation of the namespace layout. | ||
## Default definition | ||
The default value is `0`. | ||
```cpp | ||
#define NLOHMANN_JSON_NAMESPACE_EXCLUDE_VERSION 0 | ||
``` | ||
|
||
When the macro is not defined, the library will define it to its default value. | ||
|
||
## Examples | ||
|
||
??? example | ||
|
||
The example shows how to use `NLOHMANN_JSON_NAMESPACE_EXCLUDE_VERSION` to disable the version namespace. | ||
|
||
```cpp | ||
--8<-- "examples/nlohmann_json_namespace_exclude_version.cpp" | ||
``` | ||
|
||
Output: | ||
|
||
```json | ||
--8<-- "examples/nlohmann_json_namespace_exclude_version.output" | ||
``` | ||
|
||
## See also | ||
|
||
- [`NLOHMANN_JSON_NAMESPACE`](nlohmann_json_namespace.md) | ||
- [`NLOHMANN_JSON_NAMESPACE_BEGIN, NLOHMANN_JSON_NAMESPACE_END`](nlohmann_json_namespace_begin.md) | ||
|
||
## Version history | ||
|
||
- Added in version 3.11.2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters