@@ -494,6 +494,9 @@ msgid ""
494
494
"decoders, for example `JSON-RPC <https://www.jsonrpc.org>`_ class hinting. "
495
495
"Default ``None``."
496
496
msgstr ""
497
+ "如果设置,将是一个在调用时以任意被解码的对象字面值 (即一个 :class:`dict`) 作为参数的函数。 该函数的返回值将代替该 "
498
+ ":class:`dict` 使用。 此特性可被用于实现自定义解码器,例如 `JSON-RPC <https://www.jsonrpc.org>`_ "
499
+ "类提示。 默认值为 ``None``。"
497
500
498
501
#: ../../library/json.rst:290
499
502
msgid ""
@@ -503,6 +506,9 @@ msgid ""
503
506
"implement custom decoders. If *object_hook* is also set, *object_pairs_hook*"
504
507
" takes priority. Default ``None``."
505
508
msgstr ""
509
+ "如果设置,将是一个在调用时以对照值的有序列表进行解码的任意对象字面值作为参数的函数。 该函数的返回值将代替该 :class:`dict` 使用。 "
510
+ "此特性可被用于实现自定义解码器。 如果还设置了 *object_hook*,则 *object_pairs_hook* 的优先级更高,。 默认值为 "
511
+ "``None``。"
506
512
507
513
#: ../../library/json.rst:300
508
514
msgid ""
@@ -511,6 +517,8 @@ msgid ""
511
517
"This can be used to parse JSON floats into custom datatypes, for example "
512
518
":class:`decimal.Decimal`."
513
519
msgstr ""
520
+ "如果设置,将是一个在调用时以代表每个要解码的 JSON 浮点数的字符串作为参数的函数。 如为 ``None`` (默认值),则它等价于 "
521
+ "``float(num_str)``。 这可被用于将 JSON 浮点数解析为自定义数据类型,例如 :class:`decimal.Decimal`。"
514
522
515
523
#: ../../library/json.rst:308
516
524
msgid ""
@@ -519,13 +527,17 @@ msgid ""
519
527
"This can be used to parse JSON integers into custom datatypes, for example "
520
528
":class:`float`."
521
529
msgstr ""
530
+ "如果设置,将是一个在调用时以代表每个要解码的 JSON 整数的字符串作为参数的函数。 如为 ``None`` (默认值),则它等价于 "
531
+ "``int(num_str)``。 这可被用于将 JSON 整数解析为自定义数据类型,例如 :class:`float`。"
522
532
523
533
#: ../../library/json.rst:316
524
534
msgid ""
525
535
"If set, a function that is called with one of the following strings: "
526
536
"``'-Infinity'``, ``'Infinity'``, or ``'NaN'``. This can be used to raise an "
527
537
"exception if invalid JSON numbers are encountered. Default ``None``."
528
538
msgstr ""
539
+ "如果设置,将是一个以下列字符串之一作为参数的函数: ``'-Infinity'``, ``'Infinity'`` 或 ``'NaN'``。 "
540
+ "这可被用于在遇到无效的 JSON 数字时引发异常。 默认值为 ``None``。"
529
541
530
542
#: ../../library/json.rst:0
531
543
msgid "Raises"
0 commit comments