This commit is contained in:
Alex Fabijanic
2015-02-10 12:24:31 -06:00
parent 1e0663563b
commit 74e970d1a1

View File

@@ -15,6 +15,7 @@
#include "Poco/JSONString.h"
#include <ostream>
namespace Poco {
@@ -39,13 +40,13 @@ std::string toJSON(char c)
void toJSON(const std::string& value, std::ostream& out, bool wrap)
{
if (wrap) out << std::string(1, '"');
if (wrap) out << '"';
for (std::string::const_iterator it = value.begin(),
end = value.end(); it != end; ++it)
{
out << toJSON(*it);
}
if (wrap) out << std::string(1, '"');
if (wrap) out << '"';
}