Reduce unnecessary whitespace in JSON. (#7372)

This commit is contained in:
David Vo 2020-08-07 22:02:55 +10:00 committed by GitHub
parent 2ffd6783c7
commit 4dd27e6d11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 56 additions and 53 deletions

View file

@ -63,5 +63,8 @@ def _handle_frozendict(obj):
)
# A JSONEncoder which is capable of encoding frozendicts without barfing
frozendict_json_encoder = json.JSONEncoder(default=_handle_frozendict)
# A JSONEncoder which is capable of encoding frozendicts without barfing.
# Additionally reduce the whitespace produced by JSON encoding.
frozendict_json_encoder = json.JSONEncoder(
default=_handle_frozendict, separators=(",", ":"),
)