@@ -284,9 +284,9 @@ def load(fp, *, cls=None, object_hook=None, parse_float=None,
284
284
``object_pairs_hook`` is an optional function that will be called with the
285
285
result of any object literal decoded with an ordered list of pairs. The
286
286
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
287
- This feature can be used to implement custom decoders that rely on the
288
- order that the key and value pairs are decoded. If ``object_hook`` is also
289
- defined, the ``object_pairs_hook`` takes priority.
287
+ This feature can be used to implement custom decoders (e.g. sort by keys
288
+ before creating dict). If ``object_hook`` is also defined, the
289
+ ``object_pairs_hook`` takes priority.
290
290
291
291
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
292
292
kwarg; otherwise ``JSONDecoder`` is used.
@@ -311,9 +311,9 @@ def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
311
311
``object_pairs_hook`` is an optional function that will be called with the
312
312
result of any object literal decoded with an ordered list of pairs. The
313
313
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
314
- This feature can be used to implement custom decoders that rely on the
315
- order that the key and value pairs are decoded. If ``object_hook`` is also
316
- defined, the ``object_pairs_hook`` takes priority.
314
+ This feature can be used to implement custom decoders (e.g. sort by keys
315
+ before creating dict). If ``object_hook`` is also defined, the
316
+ ``object_pairs_hook`` takes priority.
317
317
318
318
``parse_float``, if specified, will be called with the string
319
319
of every JSON float to be decoded. By default this is equivalent to
0 commit comments