public function JsonEncoder::supportsEncoding

Checks whether the serializer can encode to given format

Parameters

string $format format name:

Return value

Boolean

Overrides EncoderInterface::supportsEncoding

1 method overrides JsonEncoder::supportsEncoding()
JsonldEncoder::supportsEncoding in drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldEncoder.php
Check whether the request is for JSON-LD.

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php, line 78

Class

JsonEncoder
Encodes JSON data

Namespace

Symfony\Component\Serializer\Encoder

Code

public function supportsEncoding($format) {
  return self::FORMAT === $format;
}