diff --git a/src/ripple/json/impl/to_string.cpp b/src/ripple/json/impl/to_string.cpp index f610a06b13..6182f4b7d2 100644 --- a/src/ripple/json/impl/to_string.cpp +++ b/src/ripple/json/impl/to_string.cpp @@ -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 diff --git a/src/ripple/json/to_string.h b/src/ripple/json/to_string.h index 04834df1e4..cf093e2125 100644 --- a/src/ripple/json/to_string.h +++ b/src/ripple/json/to_string.h @@ -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);