public Object transform(XMLStreamReader source, TransformationContext context) {
try {
StringWriter writer = new StringWriter();
XMLStreamWriter jsonWriter = new BadgerFishXMLStreamWriter(writer);
XMLStreamSerializer serializer = new XMLStreamSerializer();
serializer.serialize(source, jsonWriter);
source.close();
Class type = null;
if (context != null && context.getTargetDataType() != null) {
type = context.getTargetDataType().getPhysical();
}