Monday, May 30, 2016

XMLSerializer4j

A while ago I was working on an application that required me to simply dump a Java object tree to an XML file and make a snapshot of the application's state. After having tried a couple of solutions such as JAXB, Castor, XStream and SimpleXML I found that all of them were lacking in one way or another.

That's why I rolled my own XML serializer library that is currently available on GitHub: XMLSerializer4j

In one sentence: It just works. All popular Java classes are supported out-of-the-box with easy extensibility just around the corner. It has good performance, supports circular references and even serializes static references and restores static final objects to their former state.

Having overshot my earlier requirements, it can be used as a complete serialization/deserialization solution in any Java application.

No more having to write boilerplate code to serialize and deserialize maps, collections, dates, URLs and what have you :)