mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Replace ujson with simplejson
This commit is contained in:
parent
3d5a25407c
commit
926ba76e23
25 changed files with 37 additions and 38 deletions
|
@ -38,7 +38,7 @@ from functools import wraps
|
|||
import synapse.metrics
|
||||
|
||||
import logging
|
||||
import ujson as json
|
||||
import simplejson as json
|
||||
|
||||
# these are only included to make the type annotations work
|
||||
from synapse.events import EventBase # noqa: F401
|
||||
|
@ -56,7 +56,7 @@ event_counter = metrics.register_counter(
|
|||
|
||||
def encode_json(json_object):
|
||||
if USE_FROZEN_DICTS:
|
||||
# ujson doesn't like frozen_dicts
|
||||
# simplejson doesn't like frozen_dicts
|
||||
return encode_canonical_json(json_object)
|
||||
else:
|
||||
return json.dumps(json_object, ensure_ascii=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue