Don't sort keys when dumping json and yaml (#39214)

This commit is contained in:
Bram Kragten 2020-08-24 16:58:27 +02:00 committed by GitHub
parent 181709f3d2
commit 28332f23b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -54,7 +54,7 @@ def save_json(
Returns True on success.
"""
try:
json_data = json.dumps(data, sort_keys=True, indent=4, cls=encoder)
json_data = json.dumps(data, indent=4, cls=encoder)
except TypeError:
msg = f"Failed to serialize to JSON: {filename}. Bad data at {format_unserializable_data(find_paths_unserializable_data(data))}"
_LOGGER.error(msg)