@@ -125,14 +125,12 @@ def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,
125125 ``.write()``-supporting file-like object).
126126
127127 If ``skipkeys`` is true then ``dict`` keys that are not basic types
128- (``str``, ``unicode``, `` int``, ``float``, ``bool``, ``None``) will be
129- skipped instead of raising a ``TypeError``.
128+ (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
129+ instead of raising a ``TypeError``.
130130
131- If ``ensure_ascii`` is false, then the some chunks written to ``fp``
132- may be ``unicode`` instances, subject to normal Python ``str`` to
133- ``unicode`` coercion rules. Unless ``fp.write()`` explicitly
134- understands ``unicode`` (as in ``codecs.getwriter()``) this is likely
135- to cause an error.
131+ If ``ensure_ascii`` is false, then the strings written to ``fp`` can
132+ contain non-ASCII characters if they appear in strings contained in
133+ ``obj``. Otherwise, all such characters are escaped in JSON strings.
136134
137135 If ``check_circular`` is false, then the circular reference check
138136 for container types will be skipped and a circular reference will
@@ -185,12 +183,12 @@ def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True,
185183 """Serialize ``obj`` to a JSON formatted ``str``.
186184
187185 If ``skipkeys`` is false then ``dict`` keys that are not basic types
188- (``str``, ``unicode``, `` int``, ``float``, ``bool``, ``None``) will be
189- skipped instead of raising a ``TypeError``.
186+ (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
187+ instead of raising a ``TypeError``.
190188
191- If ``ensure_ascii`` is false, then the return value will be a
192- ``unicode`` instance subject to normal Python ``str`` to ``unicode``
193- coercion rules instead of being escaped to an ASCII ``str`` .
189+ If ``ensure_ascii`` is false, then the return value can contain non-ASCII
190+ characters if they appear in strings contained in ``obj``. Otherwise, all
191+ such characters are escaped in JSON strings .
194192
195193 If ``check_circular`` is false, then the circular reference check
196194 for container types will be skipped and a circular reference will
0 commit comments