blob: 66a77a0fae306d83be23ae1c54ec54898e3b3e2e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include <google/protobuf/stubs/common.h>
namespace google {
namespace protobuf {
namespace io {
void PrintJSONString(IOutputStream& stream, const TProtoStringType& string);
template<class T>
struct TAsJSON {
public:
TAsJSON(const T& t)
: T_(t)
{
}
const T& T_;
};
template<class T>
inline IOutputStream& operator <<(IOutputStream& stream, const TAsJSON<T>& protoAsJSON) {
protoAsJSON.T_.PrintJSON(stream);
return stream;
}
}
}
}
|