You are here

public function JsonEncoder::supportsDecoding in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsDecoding()
  2. 8 core/modules/hal/src/Encoder/JsonEncoder.php \Drupal\hal\Encoder\JsonEncoder::supportsDecoding()
  3. 8 core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder::supportsDecoding()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsDecoding()

Checks whether the deserializer can decode from given format.

Parameters

string $format format name:

Return value

bool

Overrides DecoderInterface::supportsDecoding

2 methods override JsonEncoder::supportsDecoding()
JsonEncoder::supportsDecoding in core/modules/serialization/src/Encoder/JsonEncoder.php
Checks whether the deserializer can decode from given format.
JsonEncoder::supportsDecoding in core/modules/hal/src/Encoder/JsonEncoder.php
Checks whether the deserializer can decode from given format.

File

vendor/symfony/serializer/Encoder/JsonEncoder.php, line 94

Class

JsonEncoder
Encodes JSON data.

Namespace

Symfony\Component\Serializer\Encoder

Code

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