mirror of
https://github.com/nlohmann/json.git
synced 2025-07-04 19:22:28 +03:00
overworked doxygen
This commit is contained in:
15
docs/examples/basic_json__array_t.cpp
Normal file
15
docs/examples/basic_json__array_t.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <json.hpp>
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array_t value
|
||||
json::array_t value = {"one", "two", 3, 4.5, false};
|
||||
|
||||
// create a JSON array from the value
|
||||
json j(value);
|
||||
|
||||
// serialize the JSON array
|
||||
std::cout << j << '\n';
|
||||
}
|
Reference in New Issue
Block a user