code: public function parseJsonResponse(ResponseInterface $response)
      {
          if (!in_array(static::getContentType($response), ['application/json', 'application/javascript', 'text/javascript'], true)) {
              throw new ParseContentException($response, 'json');
          }
  
          $content = (string) $response->getBody();
          try {
              return \GuzzleHttp\json_decode($content);
          } catch (\InvalidArgumentException $e) {
              throw new ParseContentException($response, 'json', $e);
          }
      }
docs: @param ResponseInterface $response
  
  @throws ParseContentException
  
  @return mixed