Fix examples/json_lines.cpp

The extra newline throws an exception.
This commit is contained in:
Mohammad Reza Gharabaghi 2023-11-27 06:15:34 +01:00 committed by GitHub
parent 344ced4012
commit c10d610054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,7 @@ int main()
input << R"({"name": "Gilbert", "wins": [["straight", "7"], ["one pair", "10"]]} input << R"({"name": "Gilbert", "wins": [["straight", "7"], ["one pair", "10"]]}
{"name": "Alexa", "wins": [["two pair", "4♠"], ["two pair", "9♠"]]} {"name": "Alexa", "wins": [["two pair", "4♠"], ["two pair", "9♠"]]}
{"name": "May", "wins": []} {"name": "May", "wins": []}
{"name": "Deloise", "wins": [["three of a kind", "5♣"]]} {"name": "Deloise", "wins": [["three of a kind", "5♣"]]})";
)";
std::string line; std::string line;
while (std::getline(input, line)) while (std::getline(input, line))