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:
1 parent
960e933837
commit
058517b5b4
1 file changed
+1
-1
@@ -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")
|
||||
Reference in new issue
Block a user