Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonResponse.php

function JsonResponse::setEncodingOptions

Sets options used while encoding data to JSON.

Return value

$this

File

vendor/symfony/http-foundation/JsonResponse.php, line 158

Class

JsonResponse
Response represents an HTTP response in JSON format.

Namespace

Symfony\Component\HttpFoundation

Code

public function setEncodingOptions(int $encodingOptions) : static {
    $this->encodingOptions = $encodingOptions;
    return $this->setData(json_decode($this->data));
}
RSS feed
Powered by Drupal