diff --git a/IPython/nbformat/v2/nbjson.py b/IPython/nbformat/v2/nbjson.py index b86297d..e67bec3 100644 --- a/IPython/nbformat/v2/nbjson.py +++ b/IPython/nbformat/v2/nbjson.py @@ -48,6 +48,7 @@ class JSONWriter(NotebookWriter): def writes(self, nb, **kwargs): kwargs['cls'] = BytesEncoder kwargs['indent'] = 4 + kwargs['sort_keys'] = True return json.dumps(nb, **kwargs)