Search code examples
loggingserializationprotocol-buffersthrift

Is there a Thrift text representation?


Is there a "standard" text representation for Thrift like there is for protobuf? (http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.text_format.html).

This is just for debugging purposes and I am assuming the whoever wants to translate a binary message to its text equivalent has access to the thrift definition file.


Solution

  • Found one possible response to my own question. There is one base "protocol" supported in Thrift that serializes structures in JSON format.

    In C# appears in as TJSONProtocol descending from TProtocol (http://svn.apache.org/repos/asf/thrift/tags/thrift-0.5.0/lib/csharp/src/Protocol/TJSONProtocol.cs). I haven't checked all of them, but at least java and c++ implementations are also currently available.