Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indentation when dumping json. #645

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Fixed
+++++

- ``H5Store.mode`` returns the file mode (#607).
- Formatting of JSON files now matches the changes from synced collections (#645).

[1.7.0] -- 2021-06-08
---------------------
Expand Down
2 changes: 1 addition & 1 deletion signac/synced_collections/backends/collection_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _load_from_resource(self):
def _save_to_resource(self):
"""Write the data to JSON file."""
# Serialize data
blob = json.dumps(self, cls=SyncedCollectionJSONEncoder).encode()
blob = json.dumps(self, cls=SyncedCollectionJSONEncoder, indent=2).encode()
# When write_concern flag is set, we write the data into dummy file and then
# replace that file with original file. We also enable this mode
# irrespective of the write_concern flag if we're running in
Expand Down