mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-14 14:40:52 -05:00
Reduce unnecessary whitespace in JSON. (#7372)
This commit is contained in:
parent
2ffd6783c7
commit
4dd27e6d11
15 changed files with 56 additions and 53 deletions
|
|
@ -17,6 +17,7 @@ import logging
|
|||
import re
|
||||
|
||||
import attr
|
||||
from canonicaljson import json
|
||||
|
||||
from twisted.internet import defer, task
|
||||
|
||||
|
|
@ -24,6 +25,9 @@ from synapse.logging import context
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Create a custom encoder to reduce the whitespace produced by JSON encoding.
|
||||
json_encoder = json.JSONEncoder(separators=(",", ":"))
|
||||
|
||||
|
||||
def unwrapFirstError(failure):
|
||||
# defer.gatherResults and DeferredLists wrap failures.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue