diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 8d092737e..ecf3cee84 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -905,6 +905,8 @@ OurFeatures::OurFeatures() , allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) , allowSingleQuotes_(false) , failIfExtra_(false) + , rejectDupKeys_(false) + , stackLimit_(1000) { } @@ -1032,7 +1034,7 @@ class OurReader { OurReader::OurReader(OurFeatures const& features) : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), - lastValue_(), commentsBefore_(), features_(features), collectComments_() { + lastValue_(), commentsBefore_(), stackDepth_(0), features_(features), collectComments_() { } bool OurReader::parse(const char* beginDoc, diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index 89cd65131..d9b9a788e 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -585,6 +585,7 @@ bool StyledWriter::hasCommentForValue(const Value& value) { StyledStreamWriter::StyledStreamWriter(std::string indentation) : document_(NULL), rightMargin_(74), indentation_(indentation), + indented_(true), addChildValues_() {} void StyledStreamWriter::write(std::ostream& out, const Value& root) {