title: Serialize GWT value object and deserialize it at server side
body: <p>I have a GWT application that needs to support the downloading of large .csv files. This is done with a ReportServlet which sets the proper content-type and other headers needed for the browser to open the download dialog and start the spreadsheet application.</p>
  
  <p>Since the reports have several filter parameters, I need to pass them to the server somehow. I can not use AJAX callbacks because in that case the browser does not pop up the download dialog. 
  Currently I am doing this by creating a form with hidden fields for each parameter and parse them each at the server side by hand.</p>
  
  <p>It would be a much more elegant solution to have a serializer for the value object, put the serialized value in <em>one</em> form parameter, deserialize on the server and use it as we were in a regular RPC call.</p>
  
  <p>At first I tried to search the GWT codebase for some serializer/deserializer api but I could not find any. After that I searched for JSON serializers but non of them had either a simple API or support for GWT. These two JSON serializers:
  <a href="http://code.google.com/p/gwtprojsonserializer/" rel="nofollow">http://code.google.com/p/gwtprojsonserializer/</a> and <a href="http://sites.google.com/site/gson/" rel="nofollow">http://sites.google.com/site/gson/</a>
  could be great, but gwtprojson serializes Dates as timestamps and put the classname in the serialized string while gson as a dateformat string and no classname in the serialized string.</p>
  
  <p><strong>So to finally get to the point</strong></p>
  
  <p>Could anyone suggest an object serializer/deserializer that works both in GWT and java?  Not neccessarily JSON, any other format will do.<br>
  or<br>
  Has anyone experience with using the serializer libraries mentioned above together, or with other libs that can serialize in GWT and deserialize in Java?</p>
  
  <p>Thanks in advance!
  pentike</p>