diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-09-08 07:33:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 07:33:48 -0400 |
commit | 72bec36d50465557744720b3955277da9fa330c4 (patch) | |
tree | afb314fa0f698de80cc4fda4421bd67239eff4ff /synapse/util/frozenutils.py | |
parent | Allow for make_awaitable's return value to be re-used. (#8261) (diff) | |
download | synapse-72bec36d50465557744720b3955277da9fa330c4.tar.xz |
Directly import json from the standard library. (#8259)
By importing from canonicaljson the simplejson module was still being used in some situations. After this change the std lib json is consistenty used throughout Synapse.
Diffstat (limited to '')
-rw-r--r-- | synapse/util/frozenutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py index 0e445e01d7..bf094c9386 100644 --- a/synapse/util/frozenutils.py +++ b/synapse/util/frozenutils.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from canonicaljson import json +import json + from frozendict import frozendict @@ -66,5 +67,5 @@ def _handle_frozendict(obj): # A JSONEncoder which is capable of encoding frozendicts without barfing. # Additionally reduce the whitespace produced by JSON encoding. frozendict_json_encoder = json.JSONEncoder( - default=_handle_frozendict, separators=(",", ":"), + allow_nan=False, separators=(",", ":"), default=_handle_frozendict, ) |