Sort json output for ease of tracking changes

This makes comparing changes to the file easy for a human while not violating
the files as computer readable data files. The ordering doesn't have meaning,
it's just for ease of human consumption.

Change-Id: I16f9e4df1acdcc2436cfd413707625a31007a0a2
This commit is contained in:
Monty Taylor 2017-08-17 09:31:32 -05:00
parent e9b1b4a14a
commit c1bd90f8f7
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ def main():
valid = validate.validate_all(schema, mapping, resolver=resolver)
if valid and '-n' not in sys.argv:
output = json.dumps(mapping, indent=2)
output = json.dumps(mapping, indent=2, sort_keys=True)
output.replace(' \n', '\n')
unversioned_filename = 'service-types.json'
versioned_filename = 'service-types.json.{version}'.format(