Skip to content

Commit

Permalink
sorting keys by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Jun 10, 2013
1 parent 40f377e commit 5885c3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ejson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def dumps(data, escape=False, **kwargs):
registered by the API user, making it possible to convert any kind
of object to types that the json library can handle.
"""
if 'sort_keys' not in kwargs:
kwargs['sort_keys'] = True

converted = json.dumps(data, default=_converter, **kwargs)
if escape:
# We're escaping the whole dumped string here cause there's no (easy)
Expand Down

0 comments on commit 5885c3c

Please sign in to comment.