diff --git a/include/json/writer.h b/include/json/writer.h index 2aff642..bef756c 100644 --- a/include/json/writer.h +++ b/include/json/writer.h @@ -33,8 +33,10 @@ Usage: StreamWriterBuilderFactory f; StreamWriter::Builder builder(&f); builder.setCommentStyle(StreamWriter::CommentStyle::None); - std::shared_ptr writer(builder.newStreamWriter(&std::cout)); - writer.write(value); + std::shared_ptr writer( + builder.newStreamWriter(&std::cout)); + writer->write(value); + std::cout.flush(); */ class JSON_API StreamWriterBuilderFactory { public: