Use the JSON encoder without whitespace in more places. (#8124)

This commit is contained in:
Patrick Cloke 2020-08-20 10:32:33 -04:00 committed by GitHub
parent 5eac0b7e76
commit dbc630a628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 27 deletions

View file

@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import logging
from twisted.web.resource import Resource
from synapse.http.server import set_cors_headers
from synapse.util import json_encoder
logger = logging.getLogger(__name__)
@ -67,4 +67,4 @@ class WellKnownResource(Resource):
logger.debug("returning: %s", r)
request.setHeader(b"Content-Type", b"application/json")
return json.dumps(r).encode("utf-8")
return json_encoder.encode(r).encode("utf-8")