code: def __parse_blacklist(self, json):
          try:
              for entry in json['blacklist']:
                  if not entry:
                      msg = "invalid json format. Blacklist entries cannot be null or empty"
                      raise InvalidFormatError(cause=msg)
                  excluded = self.__encode(entry)
                  bl = self._blacklist.get(excluded, None)
                  if not bl:
                      bl = MatchingBlacklist(excluded=excluded)
                      self._blacklist[excluded] = bl
          except KeyError as e:
              msg = "invalid json format. Attribute %s not found" % e.args
              raise InvalidFormatError(cause=msg)