Specify ensure_ascii=False
argument:
>>> import json
>>>
>>> d = {"person": "ç", "á": 'à', "ç": 'ã'}
>>> print json.dumps(d, indent=4, sort_keys=True, ensure_ascii=False)
{
"person": "ç",
"á": "à",
"ç": "ã"
}
According to json module documentation:
If ensure_ascii is True (the default), all non-ASCII characters in the
output are escaped with \uXXXX sequences, and the result is a str
instance consisting of ASCII characters only. If ensure_ascii is
False, some chunks written to fp may be unicode instances. This
usually happens because the input contains unicode strings or the
encoding parameter is used. Unless fp.write() explicitly understands
unicode (as in codecs.getwriter()) this is likely to cause an error.