Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarJson.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarJson.cpp')
-rw-r--r--source/core/StarJson.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/StarJson.cpp b/source/core/StarJson.cpp
index 7cf1cda..15b7092 100644
--- a/source/core/StarJson.cpp
+++ b/source/core/StarJson.cpp
@@ -868,6 +868,12 @@ String Json::printJson(int pretty, bool sort) const {
return repr(pretty, sort);
}
+String Json::printString() const {
+ if (type() == Type::String)
+ return *m_data.get<StringConstPtr>();
+ return repr();
+}
+
std::ostream& operator<<(std::ostream& os, Json const& v) {
outputUtf8Json(v, std::ostream_iterator<char>(os), 0, false);
return os;