Add pretty(Json::Value)

This commit is contained in:
Vinnie Falco
2015-05-31 16:10:44 -07:00
parent 8adc4c1e3c
commit 4cfffdf76f
2 changed files with 8 additions and 0 deletions

View File

@@ -29,4 +29,9 @@ std::string to_string (Value const& value)
return FastWriter ().write (value);
}
std::string pretty (Value const& value)
{
return StyledWriter().write (value);
}
} // namespace Json

View File

@@ -30,6 +30,9 @@ class Value;
/** Writes a Json::Value to an std::string. */
std::string to_string (Value const&);
/** Writes a Json::Value to an std::string. */
std::string pretty (Value const&);
/** Output using the StyledStreamWriter. @see Json::operator>>(). */
std::ostream& operator<< (std::ostream&, const Value& root);