Remove frozendict_json_encoder and support frozendicts everywhere

Not being able to serialise `frozendicts` is fragile, and it's annoying to have
to think about which serialiser you want. There's no real downside to
supporting frozendicts, so let's just have one json encoder.
This commit is contained in:
Richard van der Hoff 2020-10-28 15:51:15 +00:00
parent fedfdfd750
commit b6ca69e4f1
7 changed files with 32 additions and 38 deletions

View file

@ -620,7 +620,7 @@ def respond_with_json(
if pretty_print:
encoder = iterencode_pretty_printed_json
else:
if canonical_json or synapse.events.USE_FROZEN_DICTS:
if canonical_json:
encoder = iterencode_canonical_json
else:
encoder = _encode_json_bytes