mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 04:44:52 -04:00
Use the JSON encoder without whitespace in more places. (#8124)
This commit is contained in:
parent
5eac0b7e76
commit
dbc630a628
9 changed files with 21 additions and 27 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue