Commit d22b2999 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

serializer: Sort keys in JSON


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b03ee906
......@@ -58,7 +58,7 @@ def DumpJson(data, indent=True):
if not indent or _JSON_INDENT is None:
txt = simplejson.dumps(data)
else:
txt = simplejson.dumps(data, indent=_JSON_INDENT)
txt = simplejson.dumps(data, indent=_JSON_INDENT, sort_keys=True)
txt = _RE_EOLSP.sub("", txt)
if not txt.endswith('\n'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment