Uses the deserializers declared on the action method and its
        extensions to deserialize the request.  Returns the result of
        the deserialization.  Raises `webob.HTTPUnsupportedMediaType`
        if the media type of the request is unsupported.

def deserialize_request(self, req):
        """
        Uses the deserializers declared on the action method and its
        extensions to deserialize the request.  Returns the result of
        the deserialization.  Raises `webob.HTTPUnsupportedMediaType`
        if the media type of the request is unsupported.
        """

        # See if we have a body
        if req.content_length == 0:
            return None

        # Get the primary deserializer
        try:
            deserializer = self.method.deserializers(req.content_type)
        except KeyError:
            raise webob.exc.HTTPUnsupportedMediaType()

        # If it has an attacher, attach all the deserializers for the
        # extensions
        if hasattr(deserializer, 'attach'):
            for ext in self.extensions:
                try:
                    deserializer.attach(ext.deserializers(req.content_type))
                except KeyError:
                    pass

        # A deserializer is simply a callable, so call it
        return deserializer(req.body)