def dump(self, file_name):
    obj = {'name': self.name, 'o2t': self.o2t, 't2o': self.t2o}
    with open(file_name, 'w') as fp:
        json.dump(obj, fp)
def dump(self, file_name):
    obj = {'name': self.name, 'o2t': self.o2t, 't2o': self.t2o}
    with open(file_name, 'w') as fp:
        json.dump(obj, fp)