Allowing for json or xml format