protected function deserialize($type, Request $request)
{
$mimeProcResult = $this->processMime($request->headers->get('Content-Type'));
if (is_null($mimeProcResult->format)) {
throw new Exception\UnsupportedMediaType();
}
return $this->serviceHateoas()->getSerializer()->deserialize($request->getContent(), $type, $mimeProcResult->format, DeserializationContext::create()->setVersion($mimeProcResult->apiVersion));
}