This commit is contained in:
nlohmann committed 2026-10-12 07:35:31 +00:00
1 parent 79119509a9
commit 22fba27145
555 files changed
+17342 -1394

No files matched your search

+15 -2
View File
@@ -21,13 +21,26 @@ The macros are defined according to the current library version.
`NLOHMANN_JSON_VERSION_PATCH` are defined by the library.
```cpp
--8<-- "examples/nlohmann_json_version.cpp"
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
int main()
{
std::cout << "JSON for Modern C++ version "
<< NLOHMANN_JSON_VERSION_MAJOR << "."
<< NLOHMANN_JSON_VERSION_MINOR << "."
<< NLOHMANN_JSON_VERSION_PATCH << std::endl;
}
```
Output:
```json
--8<-- "examples/nlohmann_json_version.output"
JSON for Modern C++ version 3.12.0
```
## See also