Added sort_keys=True by default in JSON serializer.
This commit is contained in:
parent
b7066e1812
commit
cd18c854e8
|
@ -21,6 +21,7 @@ class JSONSerializer(AbstractSerializer):
|
|||
|
||||
def encode(self, d, **kwargs):
|
||||
kwargs.setdefault('default', self._encode_default)
|
||||
kwargs.setdefault('sort_keys', True)
|
||||
data = json.dumps(d, **kwargs)
|
||||
return data
|
||||
|
||||
|
|
Loading…
Reference in New Issue