def write_json(self, date=(datetime.date.today()),<EOL>organization='<STR_LIT>',dict_to_write={}, path_ending_type='<STR_LIT>'):
for repo in dict_to_write:<EOL><INDENT>if len(dict_to_write[repo]) != <NUM_LIT:0>:<EOL><INDENT>path = ('<STR_LIT>' + organization + '<STR_LIT:/>' + repo + '<STR_LIT:/>' +<EOL>path_ending_type + '<STR_LIT:/>' + str(date) + '<STR_LIT>')<EOL>self.checkDir(path)<EOL>with open(path, '<STR_LIT:w>') as out:<EOL><INDENT>out.write(json.dumps(dict_to_write[repo], sort_keys=True,<EOL>indent=<NUM_LIT:4>, separators=('<STR_LIT:U+002C>', '<STR_LIT>')))<EOL><DEDENT>out.close()<EOL><DEDENT><DEDENT>
Writes all traffic data to file in JSON form.