mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-03-03 12:58:02 +01:00
parent
bb34617267
commit
ed1ab7ac45
@ -104,8 +104,7 @@ bool Reader::parse(std::istream& is, Value& root, bool collectComments) {
|
|||||||
|
|
||||||
// Since String is reference-counted, this at least does not
|
// Since String is reference-counted, this at least does not
|
||||||
// create an extra copy.
|
// create an extra copy.
|
||||||
String doc;
|
String doc(std::istreambuf_iterator<char>(is), {});
|
||||||
std::getline(is, doc, static_cast<char> EOF);
|
|
||||||
return parse(doc.data(), doc.data() + doc.size(), root, collectComments);
|
return parse(doc.data(), doc.data() + doc.size(), root, collectComments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user