thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Reiss <dre...@facebook.com>
Subject Re: convert form binary to json
Date Fri, 12 Feb 2010 03:22:31 GMT
You can do this in C++ with the TProtocolTap class.  See
contrib/thrift_dump.cpp for an example of how to do this.  (It converts
from binary to TDebugProtocol.)  TProtocolTap is a pretty simple class.
It probably wouldn't be to hard to implement it in Java.

Rokita, Greg wrote:
> Is there a way to generically convert TBinaryProtocol byte array to TJsonProtocol given
a reference to Iface  for that message?  (in Java)
> 
> I looked at the code but the serialization requires me to have concrete TBase object.
 All I have is Iface interface.
> 
> I'm sure someone needed that before for debugging...
> 

Mime
View raw message