Replace ujson with simplejson

This commit is contained in:
Erik Johnston 2018-03-15 23:43:31 +00:00
parent 3d5a25407c
commit 926ba76e23
25 changed files with 37 additions and 38 deletions

View file

@ -35,7 +35,7 @@ from canonicaljson import encode_canonical_json
import logging
import random
import ujson
import simplejson
logger = logging.getLogger(__name__)
@ -561,8 +561,8 @@ class MessageHandler(BaseHandler):
# Ensure that we can round trip before trying to persist in db
try:
dump = ujson.dumps(unfreeze(event.content))
ujson.loads(dump)
dump = simplejson.dumps(unfreeze(event.content))
simplejson.loads(dump)
except Exception:
logger.exception("Failed to encode content: %r", event.content)
raise