docs: def _message_to_payload(cls, message):
          '''Returns a Python object or a ProtocolError.'''
          try:
              return json.loads(message.decode())
          except UnicodeDecodeError:
              message = 'messages must be encoded in UTF-8'
          except json.JSONDecodeError:
              message = 'invalid JSON'
          raise cls._error(cls.PARSE_ERROR, message, True, None)