1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

📝 added example and documentation for the meta function

This commit is contained in:
Niels Lohmann
2017-01-28 17:12:29 +01:00
parent cdde1a9436
commit 38e4935db0
5 changed files with 69 additions and 2 deletions

9
doc/examples/meta.cpp Normal file
View File

@ -0,0 +1,9 @@
#include <json.hpp>
using json = nlohmann::json;
int main()
{
// call meta()
std::cout << std::setw(4) << json::meta() << '\n';
}

1
doc/examples/meta.link Normal file
View File

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/3hERJociqLo3vdod"><b>online</b></a>

17
doc/examples/meta.output Normal file
View File

@ -0,0 +1,17 @@
{
"compiler": {
"c++": "201103",
"family": "clang",
"version": "8.0.0 (clang-800.0.42.1)"
},
"copyright": "(C) 2013-2017 Niels Lohmann",
"name": "JSON for Modern C++",
"platform": "apple",
"url": "https://github.com/nlohmann/json",
"version": {
"major": 2,
"minor": 1,
"patch": 0,
"string": "2.1.0"
}
}