@@ -127,8 +127,9 @@ def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True,
127127 instead of raising a ``TypeError``.
128128
129129 If ``ensure_ascii`` is false, then the strings written to ``fp`` can
130- contain non-ASCII characters if they appear in strings contained in
131- ``obj``. Otherwise, all such characters are escaped in JSON strings.
130+ contain non-ASCII and non-printable characters if they appear in strings
131+ contained in ``obj``. Otherwise, all such characters are escaped in JSON
132+ strings.
132133
133134 If ``check_circular`` is false, then the circular reference check
134135 for container types will be skipped and a circular reference will
@@ -144,10 +145,11 @@ def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True,
144145 level of 0 will only insert newlines. ``None`` is the most compact
145146 representation.
146147
147- If specified, ``separators`` should be an ``(item_separator, key_separator)``
148- tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
149- ``(',', ': ')`` otherwise. To get the most compact JSON representation,
150- you should specify ``(',', ':')`` to eliminate whitespace.
148+ If specified, ``separators`` should be an ``(item_separator,
149+ key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
150+ ``None`` and ``(',', ': ')`` otherwise. To get the most compact JSON
151+ representation, you should specify ``(',', ':')`` to eliminate
152+ whitespace.
151153
152154 ``default(obj)`` is a function that should return a serializable version
153155 of obj or raise TypeError. The default simply raises TypeError.
@@ -188,9 +190,10 @@ def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True,
188190 (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
189191 instead of raising a ``TypeError``.
190192
191- If ``ensure_ascii`` is false, then the return value can contain non-ASCII
192- characters if they appear in strings contained in ``obj``. Otherwise, all
193- such characters are escaped in JSON strings.
193+ If ``ensure_ascii`` is false, then the return value can contain
194+ non-ASCII and non-printable characters if they appear in strings
195+ contained in ``obj``. Otherwise, all such characters are escaped in
196+ JSON strings.
194197
195198 If ``check_circular`` is false, then the circular reference check
196199 for container types will be skipped and a circular reference will
@@ -206,10 +209,11 @@ def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True,
206209 level of 0 will only insert newlines. ``None`` is the most compact
207210 representation.
208211
209- If specified, ``separators`` should be an ``(item_separator, key_separator)``
210- tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
211- ``(',', ': ')`` otherwise. To get the most compact JSON representation,
212- you should specify ``(',', ':')`` to eliminate whitespace.
212+ If specified, ``separators`` should be an ``(item_separator,
213+ key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
214+ ``None`` and ``(',', ': ')`` otherwise. To get the most compact JSON
215+ representation, you should specify ``(',', ':')`` to eliminate
216+ whitespace.
213217
214218 ``default(obj)`` is a function that should return a serializable version
215219 of obj or raise TypeError. The default simply raises TypeError.
@@ -280,11 +284,12 @@ def load(fp, *, cls=None, object_hook=None, parse_float=None,
280284 ``object_hook`` will be used instead of the ``dict``. This feature
281285 can be used to implement custom decoders (e.g. JSON-RPC class hinting).
282286
283- ``object_pairs_hook`` is an optional function that will be called with the
284- result of any object literal decoded with an ordered list of pairs. The
285- return value of ``object_pairs_hook`` will be used instead of the ``dict``.
286- This feature can be used to implement custom decoders. If ``object_hook``
287- is also defined, the ``object_pairs_hook`` takes priority.
287+ ``object_pairs_hook`` is an optional function that will be called with
288+ the result of any object literal decoded with an ordered list of pairs.
289+ The return value of ``object_pairs_hook`` will be used instead of the
290+ ``dict``. This feature can be used to implement custom decoders. If
291+ ``object_hook`` is also defined, the ``object_pairs_hook`` takes
292+ priority.
288293
289294 To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
290295 kwarg; otherwise ``JSONDecoder`` is used.
@@ -305,11 +310,12 @@ def loads(s, *, cls=None, object_hook=None, parse_float=None,
305310 ``object_hook`` will be used instead of the ``dict``. This feature
306311 can be used to implement custom decoders (e.g. JSON-RPC class hinting).
307312
308- ``object_pairs_hook`` is an optional function that will be called with the
309- result of any object literal decoded with an ordered list of pairs. The
310- return value of ``object_pairs_hook`` will be used instead of the ``dict``.
311- This feature can be used to implement custom decoders. If ``object_hook``
312- is also defined, the ``object_pairs_hook`` takes priority.
313+ ``object_pairs_hook`` is an optional function that will be called with
314+ the result of any object literal decoded with an ordered list of pairs.
315+ The return value of ``object_pairs_hook`` will be used instead of the
316+ ``dict``. This feature can be used to implement custom decoders. If
317+ ``object_hook`` is also defined, the ``object_pairs_hook`` takes
318+ priority.
313319
314320 ``parse_float``, if specified, will be called with the string
315321 of every JSON float to be decoded. By default this is equivalent to
0 commit comments