mirror of
https://github.com/nlohmann/json.git
synced 2024-08-24 14:02:29 +02:00
0258484626
- updated documentation wrt. new repository layout - temporarily switched off Homebrew --HEAD building (can only be switched on after release) - set copyright date to 2018
14 lines
262 B
C++
14 lines
262 B
C++
#include <iostream>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
using json = nlohmann::json;
|
|
|
|
int main()
|
|
{
|
|
// create JSON array
|
|
json array = {"first", "2nd", "third", "fourth"};
|
|
|
|
// output element at index 2 (third element)
|
|
std::cout << array.at(2) << '\n';
|
|
}
|