Skip to content

Instantly share code, notes, and snippets.

@tjsnell
Created March 5, 2014 17:44
Show Gist options
  • Save tjsnell/9372424 to your computer and use it in GitHub Desktop.
Save tjsnell/9372424 to your computer and use it in GitHub Desktop.
just for pr3d
try {
String str = message.getPayload(String.class);
JSONObject json = new JSONObject(str);
String xml = "<?xml version=\"1.0\" encoding=\"UTF-16\"?><object>" + XML.toString(json) + "</object>";
return xml;
} catch (Exception e) {
System.out.println("Error: " + e);
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment