def save_to_json(self, pretty_print, export_path):
    if pretty_print:
        string = json.dumps(self.descriptors, ensure_ascii=False, indent=4)
    else:
        string = json.dumps(self.descriptors, ensure_ascii=False)
    with codecs.open(((export_path + self.name) + '.json'), 'w', 'utf-8') as f:
        f.write(string)
def save_to_json(self, pretty_print, export_path):
    if pretty_print:
        string = json.dumps(self.descriptors, ensure_ascii=False, indent=4)
    else:
        string = json.dumps(self.descriptors, ensure_ascii=False)
    with codecs.open(((export_path + self.name) + '.json'), 'w', 'utf-8') as f:
        f.write(string)