No.  The code for serializing maps is generated and inlined into the
code that serializes the structure that contains it.  The Thrift
library has no support for serializing containers directly.

The loops are pretty simple, though, so you could copy them out of
the generated code, if you want.

--David

Michael Andrews wrote:
> Hi,
> 
> I noticed on the wiki, the following java code snippet:
> 
> Work work = new Work();
> TSerializer serializer = new TSerializer(new TSimpleJSONProtocol.Factory());
> String json = serializer.toString(work);
> 
> where work is a struct defined in the IDL.
> 
> Is there a way to convert a List / Map so that it can be serialized in this 
> manner?
> 
> Michael

Reply via email to