src/ContentNegotiation/JmsSerializerContentNegotiation.php
public function deserializeRequest($className)
    {
        $request = $this->app["request_stack"]->getCurrentRequest();

        return $this->app["serializer"]->deserialize(
            $request->getContent(),
            $className,
            $request->getContentType(),
            $this->app["conneg.deserializationContext"]
        );
    }
public function deserializeRequest($className)
    {
        $request = $this->app["request_stack"]->getCurrentRequest();

        return $this->app["serializer"]->deserialize(
            $request->getContent(),
            $className,
            $request->getContentType(),
            $this->app["conneg.deserializationContext"]
        );
    }
This method retrieves the request body in any supported format and deserializes it.

@param string $className
@return object