From 38042b3892c762c93a98be7c4c5c14f80d7ed46e Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Mon, 26 Jan 2015 11:23:31 -0600 Subject: [PATCH] docs --- doc/jsoncpp.dox | 1 + include/json/writer.h | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/jsoncpp.dox b/doc/jsoncpp.dox index fe06d50..0581476 100644 --- a/doc/jsoncpp.dox +++ b/doc/jsoncpp.dox @@ -79,6 +79,7 @@ root["encoding"] = getCurrentEncoding(); root["indent"]["length"] = getCurrentIndentLength(); root["indent"]["use_space"] = getCurrentIndentUseSpace(); +// (NEW IN 1.4.0) // To write into a steam with minimal memory overhead, // create a Builder for a StreamWriter. Json::StreamWriterBuilder builder; diff --git a/include/json/writer.h b/include/json/writer.h index be8ea38..c4fd6ed 100644 --- a/include/json/writer.h +++ b/include/json/writer.h @@ -29,9 +29,9 @@ class Value; Usage: \code using namespace Json; - void writeToStdout(StreamWriter::Builder const& builder, Value const& value) { + void writeToStdout(StreamWriter::Factory const& factory, Value const& value) { std::unique_ptr const writer( - builder.newStreamWriter(&std::cout)); + factory.newStreamWriter(&std::cout)); writer->write(value); std::cout << std::endl; // add lf and flush } @@ -76,7 +76,7 @@ Usage: \code using namespace Json; Value value = ...; - StreamWriter::Builder builder; + StreamWriterBuilder builder; builder.cs_ = StreamWriter::CommentStyle::None; std::shared_ptr writer( builder.newStreamWriter(&std::cout)); @@ -154,7 +154,7 @@ public: }; /** \brief Abstract class for writers. - * \deprecated Use StreamWriter::Builder. + * \deprecated Use StreamWriter. */ class JSON_API Writer { public: @@ -170,7 +170,7 @@ public: *consumption, * but may be usefull to support feature such as RPC where bandwith is limited. * \sa Reader, Value - * \deprecated Use StreamWriter::Builder. + * \deprecated Use OldCompressingStreamWriterBuilder. */ class JSON_API FastWriter : public Writer { public: @@ -222,7 +222,7 @@ private: *#CommentPlacement. * * \sa Reader, Value, Value::setComment() - * \deprecated Use StreamWriter::Builder. + * \deprecated Use StreamWriterBuilder. */ class JSON_API StyledWriter : public Writer { public: @@ -284,7 +284,7 @@ private: * * \param indentation Each level will be indented by this amount extra. * \sa Reader, Value, Value::setComment() - * \deprecated Use StreamWriter::Builder. + * \deprecated Use StreamWriterBuilder. */ class JSON_API StyledStreamWriter { public: