Skip to content

Commit

Permalink
πŸ‘Œ Minify output of needs.json (#1233)
Browse files Browse the repository at this point in the history
Removing the indent of `json.dump` means it will now be output on a single line; reducing the size of the stored JSON.
  • Loading branch information
chrisjsewell authored Aug 23, 2024
1 parent 01ca3ff commit 3fe2dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_needs/needsfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def write_json(self, needs_file: str = "needs.json", needs_path: str = "") -> No
needs_dir = self.outdir

with open(os.path.join(needs_dir, needs_file), "w") as f:
json.dump(self.needs_list, f, indent=4, sort_keys=True)
json.dump(self.needs_list, f, sort_keys=True)

def load_json(self, file: str) -> None:
if not os.path.isabs(file):
Expand Down

0 comments on commit 3fe2dd4

Please sign in to comment.