mirror of
https://github.com/nlohmann/json.git
synced 2026-10-13 09:47:12 +00:00
deploy: 40a62947d3
This commit is contained in:
1 parent
79119509a9
commit
22fba27145
555 files changed
+17342
-1394
No files matched your search
+30
-2
@@ -35,13 +35,41 @@ Constant.
|
||||
The following code shows an example output of the `meta()` function.
|
||||
|
||||
```cpp
|
||||
--8<-- "examples/meta.cpp"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// call meta()
|
||||
std::cout << std::setw(4) << json::meta() << '\n';
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
--8<-- "examples/meta.output"
|
||||
{
|
||||
"compiler": {
|
||||
"c++": "201103",
|
||||
"family": "gcc",
|
||||
"version": "12.4.0"
|
||||
},
|
||||
"copyright": "(C) 2013-2026 Niels Lohmann",
|
||||
"name": "JSON for Modern C++",
|
||||
"platform": "apple",
|
||||
"url": "https://github.com/nlohmann/json",
|
||||
"version": {
|
||||
"major": 3,
|
||||
"minor": 12,
|
||||
"patch": 0,
|
||||
"string": "3.12.0"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Note the output is platform-dependent.
|
||||
|
||||
Reference in new issue
Block a user