mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-27 03:17:09 +08:00
Merge branch 'fix-578'
This commit is contained in:
commit
5331d295aa
@ -103,8 +103,7 @@ Reader::Reader(const Features& features)
|
||||
|
||||
bool
|
||||
Reader::parse(const std::string& document, Value& root, bool collectComments) {
|
||||
JSONCPP_STRING documentCopy(document.data(), document.data() + document.capacity());
|
||||
std::swap(documentCopy, document_);
|
||||
document_.assign(document.begin(), document.end());
|
||||
const char* begin = document_.c_str();
|
||||
const char* end = begin + document_.length();
|
||||
return parse(begin, end, root, collectComments);
|
||||
|
Loading…
x
Reference in New Issue
Block a user