Wednesday 4 December 2013

Java: JSON to XML with JAXB and Jackson

Here's a small example demonstrating how to convert JSON to XML using JAXB data binding. You might want to use this over streaming where you want to operate on objects in an intermediary step. It is possible to perform the reverse operation but that is not demonstrated here.

  • Java 7
  • Jackson 2.2
    • jackson-core-2.2.0.jar
    • jackson-databind-2.2.0.jar
    • jackson-annotations-2.2.0.jar
    • jackson-module-jaxb-annotations-2.2.0.jar