[util] use minimal separators for 'json_dumps()'

This commit is contained in:
Mike Fährmann
2024-10-01 17:03:13 +02:00
parent ed859f05ed
commit a120295632
4 changed files with 8 additions and 6 deletions

View File

@@ -253,7 +253,11 @@ def json_default(obj):
json_loads = json._default_decoder.decode
json_dumps = json.JSONEncoder(default=json_default).encode
json_dumps = json.JSONEncoder(
check_circular=False,
separators=(",", ":"),
default=json_default,
).encode
def dump_json(obj, fp=sys.stdout, ensure_ascii=True, indent=4):