change datamapper mediator to handle XM and JSON