Send response as JSON

Send the response to AJAX as JSON, otherwise a DomainException will be thrown.