InstallationApplicationWeb::sendJsonResponse

Method to send a JSON response. The data parameter can be a Exception object for when an error has occurred or a stdClass for a good response.