mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:34:49 -04:00
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.
This commit is contained in:
parent
cef00211c8
commit
72bec36d50
5 changed files with 7 additions and 6 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue