@@ -623,6 +623,10 @@ msgid ""
623
623
"trying to encode keys that are not :class:`str`, :class:`int`, :class:"
624
624
"`float` or ``None``. If *skipkeys* is true, such items are simply skipped."
625
625
msgstr ""
626
+ "若 *skipkeys* 為 false(預設值),則當在編碼不是 :class:`str`,:class:`int`,"
627
+ ":class:`float` 或 ``None`` 的鍵值時,將引發 :exc:`TypeError`。如果 *skipkeys* "
628
+ "為 true,這些項目將直接被跳過。"
629
+
626
630
627
631
#: ../../library/json.rst:437
628
632
msgid ""
@@ -631,6 +635,10 @@ msgid ""
631
635
"prevent an infinite recursion (which would cause a :exc:`RecursionError`). "
632
636
"Otherwise, no such check takes place."
633
637
msgstr ""
638
+ "如果 *check_circular* 為 true(預設值),則會在編碼期間檢查列表(list)、字典(dict)"
639
+ "和自定義編碼物件的循環參照,以防止無限遞迴(一個會導致 :exc:`RecursionError` 例外的問題)。"
640
+ "否則不會進行此類檢查。"
641
+
634
642
635
643
#: ../../library/json.rst:442
636
644
msgid ""
@@ -639,13 +647,20 @@ msgid ""
639
647
"compliant, but is consistent with most JavaScript based encoders and "
640
648
"decoders. Otherwise, it will be a :exc:`ValueError` to encode such floats."
641
649
msgstr ""
650
+ "如果 *allow_nan* 為 true(預設值),則 ``NaN``、``Infinity`` 和 ``-Infinity`` 將按"
651
+ "照原樣進行編碼。請記得此行為不符合標準 JSON 規範,但的確與大多數基於 JavaScript 的編碼器和解"
652
+ "碼器一致。否則若設為 false,嘗試對這些浮點數進行編碼將引發 :exc:`ValueError` 例外。"
653
+
642
654
643
655
#: ../../library/json.rst:448
644
656
msgid ""
645
657
"If *sort_keys* is true (default: ``False``), then the output of dictionaries "
646
658
"will be sorted by key; this is useful for regression tests to ensure that "
647
659
"JSON serializations can be compared on a day-to-day basis."
648
660
msgstr ""
661
+ "如果 *sort_keys* 為 true(預設值:``False``),則 dictionary(字典)的輸出將按鍵值排序。"
662
+ "這項功能可確保 JSON 序列化的結果能被互相比較,能讓回歸測試的檢查變得方便。"
663
+
649
664
650
665
#: ../../library/json.rst:481
651
666
msgid ""
0 commit comments