From 37dde9d29d5e102af74ec2c7dd608938d93026cc Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Wed, 4 Mar 2015 15:04:19 -0600 Subject: [PATCH] fix example in docs --- doc/jsoncpp.dox | 4 ++-- include/json/writer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/jsoncpp.dox b/doc/jsoncpp.dox index 639c909..47efc8a 100644 --- a/doc/jsoncpp.dox +++ b/doc/jsoncpp.dox @@ -96,13 +96,13 @@ features without losing binary-compatibility. \code // For convenience, use `writeString()` with a specialized builder. Json::StreamWriterBuilder wbuilder; -wbuilder.settings_["indentation"] = "\t"; // simple Json::Value +wbuilder["indentation"] = "\t"; std::string document = Json::writeString(wbuilder, root); // Here, using a specialized Builder, we discard comments and // record errors as we parse. Json::CharReaderBuilder rbuilder; -rbuilder.settings_["collectComments"] = false; // simple Json::Value +rbuilder["collectComments"] = false; std::string errs; bool ok = Json::parseFromStream(rbuilder, std::cin, &root, &errs); \endcode diff --git a/include/json/writer.h b/include/json/writer.h index 4c7a8bd..ed21c9b 100644 --- a/include/json/writer.h +++ b/include/json/writer.h @@ -76,8 +76,8 @@ Usage: using namespace Json; Value value = ...; StreamWriterBuilder builder; - builder.settings_["commentStyle"] = "None"; - builder.settings_["indentation"] = " "; // or whatever you like + builder["commentStyle"] = "None"; + builder["indentation"] = " "; // or whatever you like std::unique_ptr writer( builder.newStreamWriter()); writer->write(value, &std::cout);