diff options
Diffstat (limited to 'Lib/json/decoder.py')
-rw-r--r-- | Lib/json/decoder.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py index 3741deed7d5..d7d824454e1 100644 --- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -292,10 +292,8 @@ class JSONDecoder(object): ``object_pairs_hook``, if specified will be called with the result of every JSON object decoded with an ordered list of pairs. The return value of ``object_pairs_hook`` will be used instead of the ``dict``. - This feature can be used to implement custom decoders that rely on the - order that the key and value pairs are decoded (for example, - collections.OrderedDict will remember the order of insertion). If - ``object_hook`` is also defined, the ``object_pairs_hook`` takes + This feature can be used to implement custom decoders. + If ``object_hook`` is also defined, the ``object_pairs_hook`` takes priority. ``parse_float``, if specified, will be called with the string @@ -317,7 +315,6 @@ class JSONDecoder(object): characters will be allowed inside strings. Control characters in this context are those with character codes in the 0-31 range, including ``'\\t'`` (tab), ``'\\n'``, ``'\\r'`` and ``'\\0'``. - """ self.object_hook = object_hook self.parse_float = parse_float or float |