]> granicus.if.org Git - python/commitdiff
Document json.dump ensure_ascii parameter (#13770)
authorÉric Araujo <merwok@netwok.org>
Mon, 16 Jan 2012 09:09:20 +0000 (10:09 +0100)
committerÉric Araujo <merwok@netwok.org>
Mon, 16 Jan 2012 09:09:20 +0000 (10:09 +0100)
Doc/library/json.rst

index 4ee17f239517e488d722e636b13327903c044867..a791259831788681390a446995c11a85b43b1968 100644 (file)
@@ -125,6 +125,10 @@ Basic Usage
    :class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
    input.
 
+   If *ensure_ascii* is ``True`` (the default), the output is guaranteed to
+   have all incoming non-ASCII characters escaped.  If *ensure_ascii* is
+   ``False``, these characters will be output as-is.
+
    If *check_circular* is ``False`` (default: ``True``), then the circular
    reference check for container types will be skipped and a circular reference
    will result in an :exc:`OverflowError` (or worse).