Atlas-Install/source/Track/load_from_json.py

3 lines
169 B
Python

def load_from_json(self, track_json: dict):
for key, value in track_json.items(): # load all value in the json as class attribute
setattr(self, key, value)