Are you asking us how to get a JSON/XML text out of the Request object?
The following post may interest you: