From 058517b5b443f1c8454ca58810568b93e39ef867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ciesielski?= Date: Thu, 4 Dec 2025 14:22:25 +0100 Subject: [PATCH] json_wrapper: don't include spaces in encoded json msgspec doesn't encodes into compact JSON, without spaces. Make default json.dumps do the same. Signed-off-by: Michal Ciesielski --- moonraker/utils/json_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/utils/json_wrapper.py b/moonraker/utils/json_wrapper.py index 5ff0dec..d2db685 100644 --- a/moonraker/utils/json_wrapper.py +++ b/moonraker/utils/json_wrapper.py @@ -30,4 +30,4 @@ if not MSGSPEC_ENABLED: loads = json.loads # type: ignore def dumps(obj) -> bytes: # type: ignore # noqa: F811 - return json.dumps(obj).encode("utf-8") + return json.dumps(obj, separators=(",", ":")).encode("utf-8")