def parse(self, msg, name):
        """Parses a simple message

        :param msg: the json-decoded value
        :param name: the requested name

        :raises UnknownMessageType: if the type is not 'simple'
        :raises InvalidMessage: if the message cannot be parsed or validated
        """

        # On requests we imply 'simple' if there is no input message
        if msg is None:
            return

        if not isinstance(msg, string_types):
            raise InvalidMessage("The 'value' attribute is not a string")

        self.name = name
        self.payload = msg
        self.msg_type = 'simple'
Parses a simple message

        :param msg: the json-decoded value
        :param name: the requested name

        :raises UnknownMessageType: if the type is not 'simple'
        :raises InvalidMessage: if the message cannot be parsed or validated