commit
b1e78cb1e4
5
test.cpp
5
test.cpp
|
@ -25,7 +25,10 @@ CHECK_TRAIT(is_nothrow_destructible<Json>);
|
||||||
|
|
||||||
void parse_from_stdin() {
|
void parse_from_stdin() {
|
||||||
string buf;
|
string buf;
|
||||||
while (!std::cin.eof()) buf += std::cin.get();
|
string line;
|
||||||
|
while (std::getline(std::cin, line)) {
|
||||||
|
buf += line + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
string err;
|
string err;
|
||||||
auto json = Json::parse(buf, err);
|
auto json = Json::parse(buf, err);
|
||||||
|
|
Loading…
Reference in New Issue