summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-11 17:10:22 +0000
committerErik Johnston <erik@matrix.org>2015-02-11 17:10:22 +0000
commit54fdbc7e50dfdd80eda563536d08bdfef079937c (patch)
tree9d28877f14b914af743629010be54a01477ffddc /synapse/federation
parentAllow newer versions of syutil (diff)
parentBump syutil version (diff)
downloadsynapse-54fdbc7e50dfdd80eda563536d08bdfef079937c.tar.xz
Merge pull request #66 from matrix-org/use-simplejson
Use simplejson
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/persistence.py7
-rw-r--r--synapse/federation/transport/server.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index 85c82a4623..76a9dcd777 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -23,7 +23,8 @@ from twisted.internet import defer
 
 from synapse.util.logutils import log_function
 
-import json
+from syutil.jsonutil import encode_canonical_json
+
 import logging
 
 
@@ -70,7 +71,7 @@ class TransactionActions(object):
             transaction.transaction_id,
             transaction.origin,
             code,
-            json.dumps(response)
+            encode_canonical_json(response)
         )
 
     @defer.inlineCallbacks
@@ -100,5 +101,5 @@ class TransactionActions(object):
             transaction.transaction_id,
             transaction.destination,
             response_code,
-            json.dumps(response_dict)
+            encode_canonical_json(response_dict)
         )
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index 9c9f8d525b..2ffb37aa18 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -20,7 +20,7 @@ from synapse.api.errors import Codes, SynapseError
 from synapse.util.logutils import log_function
 
 import logging
-import json
+import simplejson as json
 import re