From 2160c9a042069385b81308b6e264da06e60ce9e2 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Fri, 23 Jan 2015 09:02:44 -0600 Subject: [PATCH] switch from StyledWriter to StyledStream writer in tests --- src/jsontestrunner/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jsontestrunner/main.cpp b/src/jsontestrunner/main.cpp index ba98587..46eb872 100644 --- a/src/jsontestrunner/main.cpp +++ b/src/jsontestrunner/main.cpp @@ -8,6 +8,7 @@ #include #include // sort +#include #include #if defined(_MSC_VER) && _MSC_VER >= 1310 @@ -158,8 +159,10 @@ static int rewriteValueTree(const std::string& rewritePath, std::string& rewrite) { // Json::FastWriter writer; // writer.enableYAMLCompatibility(); - Json::StyledWriter writer; - rewrite = writer.write(root); + Json::StyledStreamWriter writer; + std::ostringstream sout; + writer.write(sout, root); + rewrite = sout.str(); FILE* fout = fopen(rewritePath.c_str(), "wt"); if (!fout) { printf("Failed to create rewrite file: %s\n", rewritePath.c_str());