original_string: private function uncan($payload) {
  
          $decoded = null;
  
          if ( empty($payload) || !is_string($payload) ) throw new RpcException("Invalid Request", -32600);
  
          if ( substr($payload, 0, 27) == 'comodojo_encrypted_request-' ) {
  
              if ( empty($this->encrypt) ) throw new RpcException("Transport error", -32300);
  
              $this->request_is_encrypted = true;
  
              $aes = new AES();
  
              $aes->setKey($this->encrypt);
  
              $payload = $aes->decrypt(base64_decode(substr($payload, 27)));
  
              if ( $payload == false ) throw new RpcException("Transport error", -32300);
  
          }
  
          if ( $this->protocol == 'xml' ) {
  
              $decoder = new XmlrpcDecoder();
  
              try {
  
                  $decoded = $decoder->decodeCall($payload);
  
              } catch (XmlrpcException $xe) {
  
                  throw new RpcException("Parse error", -32700);
  
              }
  
          } else if ( $this->protocol == 'json' ) {
  
              if ( strtolower($this->encoding) != 'utf-8' ) {
  
                  $payload = mb_convert_encoding($payload, "UTF-8", strtoupper($this->encoding));
  
              }
  
              $decoded = json_decode($payload, false /*DO RAW conversion*/);
  
              if ( is_null($decoded) ) throw new RpcException("Parse error", -32700);
  
          } else {
  
              throw new RpcException("Transport error", -32300);
  
          }
  
          return $decoded;
  
      }
code: private function uncan($payload) {
  
          $decoded = null;
  
          if ( empty($payload) || !is_string($payload) ) throw new RpcException("Invalid Request", -32600);
  
          if ( substr($payload, 0, 27) == 'comodojo_encrypted_request-' ) {
  
              if ( empty($this->encrypt) ) throw new RpcException("Transport error", -32300);
  
              $this->request_is_encrypted = true;
  
              $aes = new AES();
  
              $aes->setKey($this->encrypt);
  
              $payload = $aes->decrypt(base64_decode(substr($payload, 27)));
  
              if ( $payload == false ) throw new RpcException("Transport error", -32300);
  
          }
  
          if ( $this->protocol == 'xml' ) {
  
              $decoder = new XmlrpcDecoder();
  
              try {
  
                  $decoded = $decoder->decodeCall($payload);
  
              } catch (XmlrpcException $xe) {
  
                  throw new RpcException("Parse error", -32700);
  
              }
  
          } else if ( $this->protocol == 'json' ) {
  
              if ( strtolower($this->encoding) != 'utf-8' ) {
  
                  $payload = mb_convert_encoding($payload, "UTF-8", strtoupper($this->encoding));
  
              }
  
              $decoded = json_decode($payload, false /*DO RAW conversion*/);
  
              if ( is_null($decoded) ) throw new RpcException("Parse error", -32700);
  
          } else {
  
              throw new RpcException("Transport error", -32300);
  
          }
  
          return $decoded;
  
      }
code_tokens: private function uncan ( $ payload ) { $ decoded = null ; if ( empty ( $ payload ) || ! is_string ( $ payload ) ) throw new RpcException ( "Invalid Request" , - 32600 ) ; if ( substr ( $ payload , 0 , 27 ) == 'comodojo_encrypted_request-' ) { if ( empty ( $ this -> encrypt ) ) throw new RpcException ( "Transport error" , - 32300 ) ; $ this -> request_is_encrypted = true ; $ aes = new AES ( ) ; $ aes -> setKey ( $ this -> encrypt ) ; $ payload = $ aes -> decrypt ( base64_decode ( substr ( $ payload , 27 ) ) ) ; if ( $ payload == false ) throw new RpcException ( "Transport error" , - 32300 ) ; } if ( $ this -> protocol == 'xml' ) { $ decoder = new XmlrpcDecoder ( ) ; try { $ decoded = $ decoder -> decodeCall ( $ payload ) ; } catch ( XmlrpcException $ xe ) { throw new RpcException ( "Parse error" , - 32700 ) ; } } else if ( $ this -> protocol == 'json' ) { if ( strtolower ( $ this -> encoding ) != 'utf-8' ) { $ payload = mb_convert_encoding ( $ payload , "UTF-8" , strtoupper ( $ this -> encoding ) ) ; } $ decoded = json_decode ( $ payload , false /*DO RAW conversion*/ ) ; if ( is_null ( $ decoded ) ) throw new RpcException ( "Parse error" , - 32700 ) ; } else { throw new RpcException ( "Transport error" , - 32300 ) ; } return $ decoded ; }
docstring: Uncan the provided payload
  
  @param string $payload
  
  @return mixed
  @throws RpcException
docstring_tokens: Uncan the provided payload