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 7
7
8
8
#include " common.h"
9
9
10
+ #include < library/cpp/yson/writer.h>
11
+
10
12
#include < library/cpp/type_info/fwd.h>
11
13
12
14
namespace NYT ::NYson {
@@ -85,6 +87,17 @@ void Deserialize(TGUID& value, const TNode& node);
85
87
void Serialize (const NTi::TTypePtr& type, NYT::NYson::IYsonConsumer* consumer);
86
88
void Deserialize (NTi::TTypePtr& type, const TNode& node);
87
89
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
+
88
101
// //////////////////////////////////////////////////////////////////////////////
89
102
90
103
} // namespace NYT
You can’t perform that action at this time.
0 commit comments