def get_json(self, record, **kw):
		extra = {}
		for attr, value in record.__dict__.items():
			if ((self.limit_keys_to and attr in self.limit_keys_to) or
					(not self.limit_keys_to and self.exclude_attrs not in attr)):
				if isinstance(value, self.BASE_TYPES):
					extra[attr] = value
				else:
					try:
						extra[attr] = repr(value)
					except Exception:
						extra[attr] = self.REPR_FAIL_PLACEHOLDER
		if extra:
			try:
				return json.dumps(extra, **kw)
			except Exception as e:
				return json.dumps({
					'formatter_error': repr(e),
				}, **kw)
		return ''
dataset/ETHPy150Open marrow/contentment/web/contentment/util/__init__.py/JSONFormatter.get_json/swapped operands of `not in`