diff --git a/src/datalad_cds/spec.py b/src/datalad_cds/spec.py index ba67300..d3b87b0 100644 --- a/src/datalad_cds/spec.py +++ b/src/datalad_cds/spec.py @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: } def to_json(self) -> str: - return json.dumps(self.to_dict(), separators=(",", ":")) + return json.dumps(self.to_dict(), separators=(",", ":"), sort_keys=True) def to_url(self) -> str: json_spec = self.to_json()