sort json keys to avoid big diffs on every save

This commit is contained in:
Martin Baeuml
2013-07-02 10:34:18 +02:00
parent 21e252798d
commit ac2a99ae33
+1 -1
View File
@@ -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):