File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
yt/cpp/mapreduce/interface Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 77
88#include " common.h"
99
10+ #include < library/cpp/yson/writer.h>
11+
1012#include < library/cpp/type_info/fwd.h>
1113
1214namespace NYT ::NYson {
@@ -85,6 +87,17 @@ void Deserialize(TGUID& value, const TNode& node);
8587void Serialize (const NTi::TTypePtr& type, NYT::NYson::IYsonConsumer* consumer);
8688void Deserialize (NTi::TTypePtr& type, const TNode& node);
8789
90+ template <typename T>
91+ TString ToYsonText (const T& value)
92+ {
93+ TStringStream out;
94+ ::NYson::TYsonWriter writer (&out, ::NYson::EYsonFormat::Text);
95+
96+ Serialize (value, &writer);
97+
98+ return out.Str ();
99+ }
100+
88101// //////////////////////////////////////////////////////////////////////////////
89102
90103} // namespace NYT
You can’t perform that action at this time.
0 commit comments