def run(self, cmd, code):
        """Attempt to parse code as JSON, return '' if it succeeds, the error message if it fails."""

        # Use ST's loose parser for its setting files.
        strict = os.path.splitext(self.filename)[1] not in self.extensions

        try:
            if strict:
                self.__class__.regex = self.strict_regex
                json.loads(code)
            else:
                self.__class__.regex = self.loose_regex
                sublime.decode_value(code)

            return ''
        except __HOLE__ as err:
            return str(err)
dataset/ETHPy150Open SublimeLinter/SublimeLinter-json/linter.py/JSON.run