*
* The code below is a hack: it treats the json string as text, then converts it to the
* intermediate xml and then deserializes that into the SeedRequest object.
*/
private String convertJson(String entityText) throws IOException {
HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
StringReader reader = new StringReader(entityText);
HierarchicalStreamReader hsr = driver.createReader(reader);
StringWriter writer = new StringWriter();
new HierarchicalStreamCopier().copy(hsr, new PrettyPrintWriter(writer));
writer.close();
return writer.toString();
}