<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dump(self):
 """ Dump the output to json. """

        report_as_json_string = utils.dict_to_json(self.report)
        if self.out_file:
            utils.string_to_file(self.out_file, report_as_json_string)
        else:
            print report_as_json_string