Don't sort keys when dumping json and yaml (#39214)
This commit is contained in:
1 parent
181709f3d2
commit
28332f23b3
3 files changed
+5
-7
No files matched your search
@@ -47,9 +47,7 @@ class HomeAssistantView:
|
||||
) -> web.Response:
|
||||
"""Return a JSON response."""
|
||||
try:
|
||||
msg = json.dumps(
|
||||
result, sort_keys=True, cls=JSONEncoder, allow_nan=False
|
||||
).encode("UTF-8")
|
||||
msg = json.dumps(result, cls=JSONEncoder, allow_nan=False).encode("UTF-8")
|
||||
except (ValueError, TypeError) as err:
|
||||
_LOGGER.error("Unable to serialize to JSON: %s\n%s", err, result)
|
||||
raise HTTPInternalServerError
|
||||
|
||||
Reference in new issue
Block a user