Remove direct access to xml and json in response visitors.
Add freeing up memory after visiting in JsonVisitor.