public function getJson()
    {
        $body = $this->getBody();
        $json = json_decode($body, true);

        if (!is_array($json)) {
            if ($this->_wasAsync) {
                return [];
            }

            // should be an array, fail otherwise
            throw new ClientException('Got a malformed result from the server');
        }

        return $json;
    }
public function getJson()
    {
        $body = $this->getBody();
        $json = json_decode($body, true);

        if (!is_array($json)) {
            if ($this->_wasAsync) {
                return [];
            }

            // should be an array, fail otherwise
            throw new ClientException('Got a malformed result from the server');
        }

        return $json;
    }
public function getJson ( ) { $ body = $ this -> getBody ( ) ; $ json = json_decode ( $ body , true ) ; if ( ! is_array ( $ json ) ) { if ( $ this -> _wasAsync ) { return [ ] ; } // should be an array, fail otherwise throw new ClientException ( 'Got a malformed result from the server' ) ; } return $ json ; }
Return the data from the JSON-encoded body

@throws ClientException
@return array - array of values from the JSON-encoded response body
Return the data from the JSON - encoded body