Added ability to return JSON from response in client.