actually render json or xml for requests