@@ -150,7 +150,7 @@ msgid ""
150150"reference check for container types will be skipped and a circular reference "
151151"will result in a :exc:`RecursionError` (or worse)."
152152msgstr ""
153- "如果 *chech_circular * 設為 false(預設是 ``True``),則針對不同容器型別的循環"
153+ "如果 *check_circular * 設為 false(預設是 ``True``),則針對不同容器型別的循環"
154154"參照 (circular reference) 的檢查將會被跳過,若有循環參照則最後將引發 :exc:"
155155"`RecursionError` (或者更糟的錯誤)。"
156156
@@ -162,6 +162,10 @@ msgid ""
162162"*allow_nan* is true, their JavaScript equivalents (``NaN``, ``Infinity``, ``-"
163163"Infinity``) will be used."
164164msgstr ""
165+ "如果 *allow_nan* 為 false(預設值:``True``\\ ),則序列化超出嚴格 JSON 規範"
166+ "之範圍的 :class:`float` 值 (``nan``, ``inf``, ``-inf``) 會引發 :exc:"
167+ "`ValueError`。如果 *allow_nan* 為 true,則將使用它們的 JavaScript 等效項 "
168+ "(``NaN``, ``Infinity``, ``-Infinity``)。"
165169
166170#: ../../library/json.rst:168 ../../library/json.rst:452
167171msgid ""
@@ -172,10 +176,14 @@ msgid ""
172176"indent indents that many spaces per level. If *indent* is a string (such as "
173177"``\"\\ t\" ``), that string is used to indent each level."
174178msgstr ""
179+ "如果 *indent* 是非負整數或字串,則 JSON 陣列元素和物件成員將使用該縮排等級進"
180+ "行漂亮列印。縮排等級 0、負數或 ``\"\" `` 只會插入換行符號。``None``\\ (預設"
181+ "值)選擇最緊湊的表示法。使用正整數縮排可以在每層縮排數量相同的空格。如果 "
182+ "*indent* 是一個字串(例如 ``\"\\ t\" ``\\ ),則該字串用於縮排每個層級。"
175183
176184#: ../../library/json.rst:175 ../../library/json.rst:459
177185msgid "Allow strings for *indent* in addition to integers."
178- msgstr ""
186+ msgstr "除了整數之外,還允許使用字串進行 *indent*。 "
179187
180188#: ../../library/json.rst:178 ../../library/json.rst:462
181189msgid ""
@@ -184,10 +192,13 @@ msgid ""
184192"': ')`` otherwise. To get the most compact JSON representation, you should "
185193"specify ``(',', ':')`` to eliminate whitespace."
186194msgstr ""
195+ "如果有指定,*separators* 應該是一個 ``(item_separator, key_separator)`` 元"
196+ "組。如果 *indent* 為 ``None`` 則預設為 ``(', ', ': ')``,否則預設為 ``(',', "
197+ "': ')``。要獲得最緊湊的 JSON 表示形式,你應該指定 ``(',', ':')`` 來消除空格。"
187198
188199#: ../../library/json.rst:183 ../../library/json.rst:467
189200msgid "Use ``(',', ': ')`` as default if *indent* is not ``None``."
190- msgstr ""
201+ msgstr "如果 *indent* 不是 ``None``,則用 ``(',', ': ')`` 當預設值 "
191202
192203#: ../../library/json.rst:186 ../../library/json.rst:470
193204msgid ""
@@ -196,38 +207,50 @@ msgid ""
196207"version of the object or raise a :exc:`TypeError`. If not specified, :exc:"
197208"`TypeError` is raised."
198209msgstr ""
210+ "如果有指定,*default* 應該是一個為無法序列化的物件呼叫的函式。它應該傳回物件"
211+ "的 JSON 可編碼版本或引發 :exc:`TypeError`。如果未指定,則會引發 :exc:"
212+ "`TypeError`。"
199213
200214#: ../../library/json.rst:191
201215msgid ""
202216"If *sort_keys* is true (default: ``False``), then the output of dictionaries "
203217"will be sorted by key."
204218msgstr ""
219+ "如果 *sort_keys* 為 true(預設值:``False``),則字典的輸出將按鍵排序。"
205220
206221#: ../../library/json.rst:194
207222msgid ""
208223"To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the :"
209224"meth:`~JSONEncoder.default` method to serialize additional types), specify "
210225"it with the *cls* kwarg; otherwise :class:`JSONEncoder` is used."
211226msgstr ""
227+ "若要使用自訂 :class:`JSONEncoder` 子類別(例如覆寫 :meth:`~JSONEncoder."
228+ "default` 方法來序列化其他型別的子類別),請使用 *cls* kwarg 指定它;否則使"
229+ "用 :class:`JSONEncoder`。"
212230
213231#: ../../library/json.rst:198 ../../library/json.rst:277
214232msgid ""
215233"All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`."
216234msgstr ""
235+ "所有可選參數現在都是\\ :ref:`僅限關鍵字 <keyword-only_parameter>`\\ 了。"
217236
218237#: ../../library/json.rst:203
219238msgid ""
220239"Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol, so "
221240"trying to serialize multiple objects with repeated calls to :func:`dump` "
222241"using the same *fp* will result in an invalid JSON file."
223242msgstr ""
243+ "與 :mod:`pickle` 和 :mod:`marshal` 不同,JSON 不是框架協定,因此嘗試使用相同"
244+ "的 *fp* 重複呼叫 :func:`dump` 來序列化多個物件將導致無效的 JSON 檔案。"
224245
225246#: ../../library/json.rst:212
226247msgid ""
227248"Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion "
228249"table <py-to-json-table>`. The arguments have the same meaning as in :func:"
229250"`dump`."
230251msgstr ""
252+ "使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *obj* 序列化為 JSON 格式化 :"
253+ "class:`str`。這些引數與 :func:`dump` 中的意義相同。"
231254
232255#: ../../library/json.rst:218
233256msgid ""
@@ -237,13 +260,20 @@ msgid ""
237260"JSON and then back into a dictionary, the dictionary may not equal the "
238261"original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys."
239262msgstr ""
263+ "JSON 鍵/值對中的鍵始終為 :class:`str` 型別。當字典轉換為 JSON 時,字典的所有"
264+ "鍵都被強制轉換為字串。因此,如果將字典轉換為 JSON,然後再轉換回字典,則該字典"
265+ "可能不等於原始字典。也就是說,如果 x 有非字串鍵,則 ``loads(dumps(x)) != "
266+ "x``。"
240267
241268#: ../../library/json.rst:227
242269msgid ""
243270"Deserialize *fp* (a ``.read()``-supporting :term:`text file` or :term:"
244271"`binary file` containing a JSON document) to a Python object using this :ref:"
245272"`conversion table <json-to-py-table>`."
246273msgstr ""
274+ "使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *fp*\\ (一個支援 ``."
275+ "read()``、包含 JSON 文件的\\ :term:`文字檔案 <text file>`\\ 或\\ :term:`二進"
276+ "位檔案 <binary file>`\\ )反序列化為 Python 物件。"
247277
248278#: ../../library/json.rst:231
249279msgid ""
@@ -253,6 +283,10 @@ msgid ""
253283"be used to implement custom decoders (e.g. `JSON-RPC <https://www.jsonrpc."
254284"org>`_ class hinting)."
255285msgstr ""
286+ "*object_hook* 是一個可選函式,將使用任何物件文本解碼的結果(一個 :class:"
287+ "`dict`\\ )來呼叫它。將使用 *object_hook* 的回傳值而不是 :class:`dict`。此功"
288+ "能可用於實作自訂解碼器(例如 `JSON-RPC <https://www.jsonrpc.org>`_ 類別提"
289+ "示)。"
256290
257291#: ../../library/json.rst:237
258292msgid ""
@@ -262,6 +296,10 @@ msgid ""
262296"`dict`. This feature can be used to implement custom decoders. If "
263297"*object_hook* is also defined, the *object_pairs_hook* takes priority."
264298msgstr ""
299+ "*object_pairs_hook* 是一個可選函式,將使用使用有序對列表解碼的任何物件文本的"
300+ "結果來呼叫該函式。將使用 *object_pairs_hook* 的回傳值而不是 :class:`dict`。此"
301+ "功能可用於實作自訂解碼器。如果也定義了 *object_hook*,則 *object_pairs_hook* "
302+ "優先。"
265303
266304#: ../../library/json.rst:243 ../../library/json.rst:348
267305msgid "Added support for *object_pairs_hook*."
@@ -274,6 +312,9 @@ msgid ""
274312"This can be used to use another datatype or parser for JSON floats (e.g. :"
275313"class:`decimal.Decimal`)."
276314msgstr ""
315+ "如有指定 *parse_float*,將使用要解碼的每個 JSON 浮點數字串進行呼叫。預設情況"
316+ "下,這相當於 ``float(num_str)``。這可用於將另一種資料型別或剖析器用於 JSON 浮"
317+ "點(例如 :class:`decimal.Decimal`\\ )。"
277318
278319#: ../../library/json.rst:251 ../../library/json.rst:356
279320msgid ""
@@ -282,24 +323,33 @@ msgid ""
282323"can be used to use another datatype or parser for JSON integers (e.g. :class:"
283324"`float`)."
284325msgstr ""
326+ "如有指定 *parse_int*,將使用要解碼的每個 JSON 整數字串進行呼叫。預設情況下,"
327+ "這相當於 ``int(num_str)``。這可用於對 JSON 整數使用另一種資料型別或剖析器(例"
328+ "如 :class:`float`\\ )。"
285329
286330#: ../../library/json.rst:256
287331msgid ""
288332"The default *parse_int* of :func:`int` now limits the maximum length of the "
289333"integer string via the interpreter's :ref:`integer string conversion length "
290334"limitation <int_max_str_digits>` to help avoid denial of service attacks."
291335msgstr ""
336+ ":func:`int` 預設的 *parse_int* 現在對於整數字串有長度上限,上限是直譯器的\\ :"
337+ "ref:`整數字串轉換長度限制 <int_max_str_digits>`,這能防止阻斷服務攻擊 "
338+ "(denial of service attacks)。"
292339
293340#: ../../library/json.rst:262 ../../library/json.rst:361
294341msgid ""
295342"*parse_constant*, if specified, will be called with one of the following "
296343"strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to "
297344"raise an exception if invalid JSON numbers are encountered."
298345msgstr ""
346+ "如果 *parse_constant* 有值,那麼以 ``'-Infinity'``、``'Infinity'`` 或 "
347+ "``'NaN'`` 字串其中之一來呼叫。這也可用於在遇到無效的 JSON 數字時引發一個例"
348+ "外。"
299349
300350#: ../../library/json.rst:267
301351msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore."
302- msgstr ""
352+ msgstr "*parse_constant* 不再以 'null'、 'true'、 'false' 呼叫了。 "
303353
304354#: ../../library/json.rst:270
305355msgid ""