public function decode(string $json)
    {
        // max depth is 0+ for json_encode(), and 1+ for json_decode()
        $result = json_decode($json, $this->decodeObjectAsArray, $this->maxDepth + 1, $this->options);

        $this->checkLastError();

        return $result;
    }
public function decode(string $json)
    {
        // max depth is 0+ for json_encode(), and 1+ for json_decode()
        $result = json_decode($json, $this->decodeObjectAsArray, $this->maxDepth + 1, $this->options);

        $this->checkLastError();

        return $result;
    }
public function decode ( string $ json ) { // max depth is 0+ for json_encode(), and 1+ for json_decode() $ result = json_decode ( $ json , $ this -> decodeObjectAsArray , $ this -> maxDepth + 1 , $ this -> options ) ; $ this -> checkLastError ( ) ; return $ result ; }
Decodes data in JSON format.

@param string $json The JSON string to decode.

@return mixed The decoded data.

@throws JsonException If the data cannot be decoded.
Decodes data in JSON format .