You are here

public function JsonEncoder::getLastDecodingError in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::getLastDecodingError()

Returns the last decoding error (if any).

Return value

int

Deprecated

since version 2.5, to be removed in 3.0. JsonDecode throws exception if an error is found.

File

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

Class

JsonEncoder
Encodes JSON data.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function getLastDecodingError() {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\\Component\\Serializer\\Encoder\\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED);
  return $this->decodingImpl
    ->getLastError();
}