} else if (formatExtension.equalsIgnoreCase("json")) {
HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
HierarchicalStreamReader hsr = driver.createReader(is);
// See http://jira.codehaus.org/browse/JETTISON-48
StringWriter writer = new StringWriter();
new HierarchicalStreamCopier().copy(hsr, new PrettyPrintWriter(writer));
writer.close();
newLayer = (TileLayer) xs.fromXML(writer.toString());
} else {
throw new RestletException("Unknown or missing format extension: "
+ formatExtension, Status.CLIENT_ERROR_BAD_REQUEST);