Skip to content

Commit

Permalink
More compact JSON dumps for unicode strings (#38)
Browse files Browse the repository at this point in the history
Pass `ensure_ascii=False` to `json.dumps`, this will produce shorter json dumps.
  • Loading branch information
tahajahangir authored and davidism committed Apr 12, 2016
1 parent 9981a90 commit 3b531f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itsdangerous.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def loads(self, payload):
return json.loads(payload)

def dumps(self, obj):
return json.dumps(obj, separators=(',', ':'))
return json.dumps(obj, ensure_ascii=False, separators=(',', ':'))


compact_json = _CompactJSON()
Expand Down

0 comments on commit 3b531f1

Please sign in to comment.