function JsonResponse::setJson
Sets a raw string containing a JSON document to be sent.
Return value
$this
2 calls to JsonResponse::setJson()
- JsonResponse::setData in vendor/
symfony/ http-foundation/ JsonResponse.php - Sets the data to be sent as JSON.
- JsonResponse::__construct in vendor/
symfony/ http-foundation/ JsonResponse.php
File
-
vendor/
symfony/ http-foundation/ JsonResponse.php, line 109
Class
- JsonResponse
- Response represents an HTTP response in JSON format.
Namespace
Symfony\Component\HttpFoundationCode
public function setJson(string $json) : static {
$this->data = $json;
return $this->update();
}