public function performAPICallWithJsonResponse($method, $path, array $options = [])
    {
        $response = $this->performAPICall($method, $path, $options);

        if ($response->getStatusCode() === 200) {
            $contents = $response->getBody()->getContents();
            $json     = json_decode($contents, true);
            if ($json === null) {
                throw ParseException::decode();
            }
            // Parse errors first, if any.
            if (array_key_exists('errors', $json)) {
                // Parse error and throw appropriate exception.
                $this->parseErrorSection($json['errors']);
            }
            // Parse links, if any.
            if (array_key_exists('links', $json)) {
                $this->links = $json['links'];
            }
            if (array_key_exists('data', $json) === false) {
                return $json;
            }
            return $json['data'];
        }

        throw new Exception(
            sprintf(
                'Got status code %d from service at path %s',
                $response->getStatusCode(),
                $path
            )
        );
    }