def run_json(self):
checks = {}<EOL>for file in self.files:<EOL><INDENT>try:<EOL><INDENT>results = self._check(file)<EOL><DEDENT>except Error as e:<EOL><INDENT>checks[file] = {<EOL>"<STR_LIT:error>": e.msg<EOL>}<EOL><DEDENT>else:<EOL><INDENT>checks[file] = {<EOL>"<STR_LIT>": results.score,<EOL>"<STR_LIT>": results.comment_ratio >= results.COMMENT_MIN,<EOL>"<STR_LIT>": "<STR_LIT>".format("<STR_LIT:\n>".join(self.html_diff(results.original, results.styled))),<EOL>}<EOL><DEDENT><DEDENT>json.dump(checks, sys.stdout, indent=<NUM_LIT:4>)<EOL>print()<EOL>
Run checks on self.files, printing json object
containing information relavent to the CS50 IDE plugin at the end.