Add support for json and xml