Skip to content

Commit be84291

Browse files
authored
Serialize dates as strings for table of contents
1 parent df2b5e4 commit be84291

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/table-of-contents-generator/toc_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def write_to_file(json_items, directory, output=None):
8484
try:
8585
os.makedirs(os.path.dirname(output_path), exist_ok=True) # Create directories if they don't exist
8686
with open(output_path, "w") as f:
87-
json.dump(json_items, f, indent=4)
87+
json.dump(json_items, f, indent=4, default=str)
8888
f.write('\n')
8989
print(f"Wrote {output_path}")
9090
except OSError as e:

0 commit comments

Comments
 (0)