try {
return parentTypeConverter.convertTo(type, source);
} catch (NoTypeConversionAvailableException e) {
// lets try a stream
StringWriter buffer = new StringWriter();
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, isPrettyPrint() ? Boolean.TRUE : Boolean.FALSE);
marshaller.marshal(value, buffer);
return parentTypeConverter.convertTo(type, buffer.toString());
}
}