Milen Dyankov

Software Engineer, Consultant, Developer Advocate

More "Simple" than "XStream"

July 19, 2010 | 1 Minute Read

I guess every Java developer dealing with JAVA/XML serialization/deserialization knows about XStream. I was using it for years until yesterday. What happened yesterday? I found out XStream dos not work out of the box with GAE. Well is's not exactly XStream's fault. A lot of stuff does not work properly with GAE due to its limitations and odd security restrictions. But my hope to quickly find patch/workaround, went away as soon as I realized the problem was reported to XStream over an year ago (http://jira.codehaus.org/browse/XSTR-566) and there is still no good solution. 

 

This way I was forced to look for alternatives. And I found Simple! Conceptually it's a very similar to XStream. Serialization is really simple to use and revolves around several annotations and a single persister object. I got the impression it's noticeably faster than XStream. It's feature list is quite long (it even claims to be bean version tolerant) but so far I've used the standard stuff like converters, transformers, persister, etc.

However since "Simple"

  • does not depend on 3rd party libraries
  • is available in central Maven repository
  • works out of the box with GAE
  • is capable of doing everything XStream is doing  

 

it's about to become my number one XML serialization/deserialization tool. At least until I discover it's dark sides.