[Global]: loading init

This commit is contained in:
JerryALT
2024-03-12 22:41:56 +03:00
commit f6f27d419a
7509 changed files with 1423218 additions and 0 deletions

22
deps/json/docs/examples/json_lines.cpp vendored Normal file
View File

@ -0,0 +1,22 @@
#include <sstream>
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
int main()
{
// JSON Lines (see https://jsonlines.org)
std::stringstream input;
input << R"({"name": "Gilbert", "wins": [["straight", "7"], ["one pair", "10"]]}
{"name": "Alexa", "wins": [["two pair", "4♠"], ["two pair", "9♠"]]}
{"name": "May", "wins": []}
{"name": "Deloise", "wins": [["three of a kind", "5♣"]]}
)";
std::string line;
while (std::getline(input, line))
{
std::cout << json::parse(line) << std::endl;
}
}