'Print out the test results in json format
warnings is not respected in this output'

def json(self, warnings=False, output='-'):

    ret = [len(r['errors']) for (_, r) in self.files.items()]
    with Reporter._output_handle(output) as handle:
        print(json.dumps(Reporter._filter_out_ok(self.files), indent=4, cls=ReporterEncoder), file=handle)
    return (3 if sum(ret) else 0)
