From ac2a99ae33cb87f42c718e118192494484b48a21 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Tue, 2 Jul 2013 10:34:18 +0200 Subject: [PATCH] sort json keys to avoid big diffs on every save --- sloth/annotations/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sloth/annotations/container.py b/sloth/annotations/container.py index 5a5d293..e7e5676 100644 --- a/sloth/annotations/container.py +++ b/sloth/annotations/container.py @@ -311,7 +311,7 @@ class JsonContainer(AnnotationContainer): """ # TODO make all image filenames relative to the label file f = open(fname, "w") - json.dump(annotations, f, indent=4) + json.dump(annotations, f, indent=4, sort_keys=True) class YamlContainer(AnnotationContainer):