Skip to content

Commit

Permalink
orchestration/experiment_output.py: dump formatted JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-kaufmann authored and FreakyPenguin committed May 6, 2024
1 parent 9481133 commit f260bf1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def add_sim(
def dump(self, outpath: str) -> None:
pathlib.Path(outpath).parent.mkdir(parents=True, exist_ok=True)
with open(outpath, 'w', encoding='utf-8') as file:
json.dump(self.__dict__, file)
json.dump(self.__dict__, file, sort_keys=True, indent=4)

def load(self, file: str) -> None:
with open(file, 'r', encoding='utf-8') as fp:
Expand Down

0 comments on commit f260bf1

Please sign in to comment.