Hi Philippe,
The code originally used some of the Thrift JSON protocols for communication with the client, but I had to scrap that at some point in favour of our own protocols. The JSON we use is much more compact and compatible with GWT overlay types, making it much more performant. Unfortunately the tricks we use to make it smaller and more performant mean that we need the objects reading from our data stream to tell us what type they expect, something we can't do with standard Thrift protocols.
Since we're not entirely Thrift compatible, there's no Thrift protocol we can offer to allow the serialization code outside of the RPC framework. We have an alternate set of protocols (com.dotspots.rpcplus.jsonrpc.thrift.TJSONProtocolReader|Writer) that serve the same function as TProtocol. TJSONProtocolWriter runs on top of a standard Thrift TProtocol, while TJSONProtocolReader runs on top of a JSONTokenizer. You can use these classes directly in concert with the object readers and writers generated in the service file:
http://code.google.com/p/gwt-rpc-plus/source/browse/trunk/gwt-rpc-plus/example/gen-json-server/com/dotspots/rpcplus/example/torturetest/TortureTestApiJson.java
All of the code for serializing and deserializing the objects is laid out in the generated json-server file. In fact, we use those methods as part of one of the unit tests to test round-tripping through the RPC layer, though we currently have to use reflection to make them accessible. You should be able to use code similar to the following to achieve what you're looking for:
http://code.google.com/p/gwt-rpc-plus/source/browse/trunk/gwt-rpc-plus/test/server-test/com/dotspots/rpcplus/test/server/TestJSONNativeProtocol.java
Let me know if you need further explanation,
Matt.
Matt Mastracci
Founder/CTO @dotspots (
http://dotspots.com)
@mmastrac