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 <michal@ciesie.com>
This commit is contained in:
Michał Ciesielski authored and Eric Callahan committed 2025-12-04 19:45:20 -05:00
1 parent 960e933837
commit 058517b5b4
1 file changed
+1 -1
+1 -1
View File
@@ -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")