{
source = new StAXSource(inputFactory.createXMLStreamReader(inputs.getInputStream(), enc == null ? "UTF-8" : enc));
}
else
{
source = new StAXSource(inputFactory.createXMLStreamReader(inputs.getReader()));
}
XMLOutputFactory outputFactory = new JsonXMLOutputFactory();
outputFactory.setProperty(JsonXMLOutputFactory.PROP_AUTO_ARRAY, true);
outputFactory.setProperty(JsonXMLOutputFactory.PROP_PRETTY_PRINT, true);