This method is a shortcut for sending data formatted as JSON. It will return
the [[Application::getResponse()|response]] application component after configuring
the [[Response::$format|format]] and setting the [[Response::$data|data]] that should
be formatted. A common usage will be:
php
return $this->asJson($data);