code: public function deserializeRequest(Request $request)
      {
          $format = $this->checkAcceptHeader($request);
  
          try {
              return $this->serializer->deserialize($request->getContent(), 'array', $format);
          } catch (\Exception $e) {
              throw new \RuntimeException(
                  'Could not deserialize content from the request.'
              );
          }
      }
docs: @param Request $request
  
  @return array