private function prepareResultPage($data)
    {
        /* convert service data object into stdClass/array */
        $type = $this->getOutDataType();
        $stdObj = $this->outputProcessor->convertValue($data, $type);
        /* prepare result page with JSON data */
        $result = $this->resultFactory->create(AResultFactory::TYPE_JSON);
        $result->setData($stdObj);
        return $result;
    }
private function prepareResultPage($data)
    {
        /* convert service data object into stdClass/array */
        $type = $this->getOutDataType();
        $stdObj = $this->outputProcessor->convertValue($data, $type);
        /* prepare result page with JSON data */
        $result = $this->resultFactory->create(AResultFactory::TYPE_JSON);
        $result->setData($stdObj);
        return $result;
    }
private function prepareResultPage ( $ data ) { /* convert service data object into stdClass/array */ $ type = $ this -> getOutDataType ( ) ; $ stdObj = $ this -> outputProcessor -> convertValue ( $ data , $ type ) ; /* prepare result page with JSON data */ $ result = $ this -> resultFactory -> create ( AResultFactory :: TYPE_JSON ) ; $ result -> setData ( $ stdObj ) ; return $ result ; }
Convert PHP object from service into JSON result page.

@param mixed $data
@return \Magento\Framework\Controller\ResultInterface
Convert PHP object from service into JSON result page .