original_string: public function parseToObj($parser)
  	{
          /** @var CheckoutApi_Lib_RespondObj $respondObj */
          $respondObj = CheckoutApi_Lib_Factory::getInstance('CheckoutApi_Lib_RespondObj');
  
  		if($parser && is_string ($parser)) {
  			$encoding = mb_detect_encoding($parser);
  			
  			if($encoding =="ASCII") {
  				$parser = iconv('ASCII', 'UTF-8', $parser);
  			}else {
  				$parser =  mb_convert_encoding($parser, "UTF-8", $encoding);
  			}
  			
  			$jsonObj = json_decode($parser,true);
  			$jsonObj['rawOutput'] = $parser;
  
  			$respondObj->setConfig($jsonObj);
  
  
  		}
          $respondObj->setConfig($this->getResourceInfo());
  		return $respondObj;
  	}
code: public function parseToObj($parser)
  	{
          /** @var CheckoutApi_Lib_RespondObj $respondObj */
          $respondObj = CheckoutApi_Lib_Factory::getInstance('CheckoutApi_Lib_RespondObj');
  
  		if($parser && is_string ($parser)) {
  			$encoding = mb_detect_encoding($parser);
  			
  			if($encoding =="ASCII") {
  				$parser = iconv('ASCII', 'UTF-8', $parser);
  			}else {
  				$parser =  mb_convert_encoding($parser, "UTF-8", $encoding);
  			}
  			
  			$jsonObj = json_decode($parser,true);
  			$jsonObj['rawOutput'] = $parser;
  
  			$respondObj->setConfig($jsonObj);
  
  
  		}
          $respondObj->setConfig($this->getResourceInfo());
  		return $respondObj;
  	}
code_tokens: public function parseToObj ( $ parser ) { /** @var CheckoutApi_Lib_RespondObj $respondObj */ $ respondObj = CheckoutApi_Lib_Factory :: getInstance ( 'CheckoutApi_Lib_RespondObj' ) ; if ( $ parser && is_string ( $ parser ) ) { $ encoding = mb_detect_encoding ( $ parser ) ; if ( $ encoding == "ASCII" ) { $ parser = iconv ( 'ASCII' , 'UTF-8' , $ parser ) ; } else { $ parser = mb_convert_encoding ( $ parser , "UTF-8" , $ encoding ) ; } $ jsonObj = json_decode ( $ parser , true ) ; $ jsonObj [ 'rawOutput' ] = $ parser ; $ respondObj -> setConfig ( $ jsonObj ) ; } $ respondObj -> setConfig ( $ this -> getResourceInfo ( ) ) ; return $ respondObj ; }
docstring: Convert a json to a CheckoutApi_Lib_RespondObj object
  @param JSON $parser
  @return CheckoutApi_Lib_RespondObj|null
  @throws Exception
docstring_tokens: Convert a json to a CheckoutApi_Lib_RespondObj object