Don't sort keys when dumping json and yaml (#39214)
This commit is contained in:
parent
181709f3d2
commit
28332f23b3
3 changed files with 5 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue