Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment