protected function toJson()
    {
        $serializedActionResults = [];

        foreach ($this->results as $action => $result) {
            $serializedActionResults[$action] = serialize($result);
        }

        $responseData = [
            'requestId' => $this->requestId,
            'actionResults' => $serializedActionResults
        ];

        return json_encode($responseData);
    }
protected function toJson()
    {
        $serializedActionResults = [];

        foreach ($this->results as $action => $result) {
            $serializedActionResults[$action] = serialize($result);
        }

        $responseData = [
            'requestId' => $this->requestId,
            'actionResults' => $serializedActionResults
        ];

        return json_encode($responseData);
    }
protected function toJson ( ) { $ serializedActionResults = [ ] ; foreach ( $ this -> results as $ action => $ result ) { $ serializedActionResults [ $ action ] = serialize ( $ result ) ; } $ responseData = [ 'requestId' => $ this -> requestId , 'actionResults' => $ serializedActionResults ] ; return json_encode ( $ responseData ) ; }
Converts the response's data to JSON.

@return string JSON representation of the results.
Converts the response s data to JSON .