private function jsonDecode($serialized_data)
    {
        $data = json_decode($serialized_data, true);

        if (json_last_error()) {
            $error_message = 'Failed to parse JSON';

            if (function_exists('json_last_error_msg')) {
                $error_message .= '. Reason: ' . json_last_error_msg();
            }

            throw new RuntimeException($error_message);
        }

        return $data;
    }
private function jsonDecode($serialized_data)
    {
        $data = json_decode($serialized_data, true);

        if (json_last_error()) {
            $error_message = 'Failed to parse JSON';

            if (function_exists('json_last_error_msg')) {
                $error_message .= '. Reason: ' . json_last_error_msg();
            }

            throw new RuntimeException($error_message);
        }

        return $data;
    }
private function jsonDecode ( $ serialized_data ) { $ data = json_decode ( $ serialized_data , true ) ; if ( json_last_error ( ) ) { $ error_message = 'Failed to parse JSON' ; if ( function_exists ( 'json_last_error_msg' ) ) { $ error_message .= '. Reason: ' . json_last_error_msg ( ) ; } throw new RuntimeException ( $ error_message ) ; } return $ data ; }
Decode JSON and throw an exception in case of any error.

@param  string $serialized_data
@return mixed
Decode JSON and throw an exception in case of any error .