public function JsonDecode::decode

Decodes a JSON string into PHP data

Parameters

string $data JSON:

Return value

mixed

Overrides DecoderInterface::decode

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php, line 50

Class

JsonDecode
Decodes JSON data

Namespace

Symfony\Component\Serializer\Encoder

Code

public function decode($data, $format) {
  $decodedData = json_decode($data, $this->associative, $this->recursionDepth);
  $this->lastError = json_last_error();
  return $decodedData;
}