@@ -240,7 +240,7 @@ msgstr ""
240
240
msgid ""
241
241
"All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`."
242
242
msgstr ""
243
- "所有可選參數現在都是\\ :ref:`關鍵字參數 <keyword-only_parameter>`\\ 了 。"
243
+ "所有可選參數現在都是\\ :ref:`僅限關鍵字 <keyword-only_parameter>`\\ 參數了 。"
244
244
245
245
#: ../../library/json.rst:203
246
246
msgid ""
@@ -342,8 +342,8 @@ msgid ""
342
342
"integer string via the interpreter's :ref:`integer string conversion length "
343
343
"limitation <int_max_str_digits>` to help avoid denial of service attacks."
344
344
msgstr ""
345
- ":func:`int` 預設的 *parse_int* 現在有限制整數字串的長度上限了,上限限制由直譯器的 \\ :"
346
- "ref:`整數字串轉換長度限制 <int_max_str_digits>`\\ 達成 ,這能防止阻斷服務攻擊 "
345
+ ":func:`int` 預設的 *parse_int* 現在有限制整數字串的長度上限了,限制由直譯器的 \\ :"
346
+ "ref:`整數字串轉換長度限制 <int_max_str_digits>`\\ 機制來達成 ,這能防止阻斷服務攻擊 "
347
347
"(denial of service attacks)。"
348
348
349
349
#: ../../library/json.rst:262 ../../library/json.rst:361
@@ -358,60 +358,67 @@ msgstr ""
358
358
359
359
#: ../../library/json.rst:267
360
360
msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore."
361
- msgstr "*parse_constant* 不再以 'null'、 'true'、 'false' 呼叫了 。"
361
+ msgstr "遭遇 'null'、 'true'、 'false' 時不再以 *parse_constant* 給定的函數來處理了 。"
362
362
363
363
#: ../../library/json.rst:270
364
364
msgid ""
365
365
"To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls`` "
366
366
"kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments "
367
367
"will be passed to the constructor of the class."
368
368
msgstr ""
369
+ "若想要使用自定義的 :class:`JSONDecoder` 子類別物件,請以 ``cls`` 關鍵字參數指定之,否則將使用預設的 :class:`JSONDecoder`。"
370
+ "其他未使用到的關鍵字參數將繼續傳入給 :class:`JSONDecoder` 的建構函數使用。"
369
371
370
372
#: ../../library/json.rst:274 ../../library/json.rst:292
371
373
#: ../../library/json.rst:371
372
374
msgid ""
373
375
"If the data being deserialized is not a valid JSON document, a :exc:"
374
376
"`JSONDecodeError` will be raised."
375
377
msgstr ""
378
+ "如果被反序列化(deserialized)的資料不符合 JSON 格式,將會觸發 :exc:`JSONDecodeError` 例外。"
376
379
377
380
#: ../../library/json.rst:280
378
381
msgid ""
379
382
"*fp* can now be a :term:`binary file`. The input encoding should be UTF-8, "
380
383
"UTF-16 or UTF-32."
381
384
msgstr ""
385
+ "現在,*fp* 可以是一個\\ :term:`二進位檔案 <binary file>`\\ ,前提是其編碼格式為 UTF-8、UTF-16 或 UTF-32。"
382
386
383
387
#: ../../library/json.rst:286
384
388
msgid ""
385
389
"Deserialize *s* (a :class:`str`, :class:`bytes` or :class:`bytearray` "
386
390
"instance containing a JSON document) to a Python object using this :ref:"
387
391
"`conversion table <json-to-py-table>`."
388
392
msgstr ""
393
+ "使用\\ :ref:`轉換表 <json-to-py-table>`\\ 將 *s* (一個含有 JSON 文件的 :class:`str`\\ 、\\ :class:`bytes` 或 :class:`bytearray` "
394
+ "的實例(instance))反序列化(deserialize)為一個 Python 物件"
389
395
390
396
#: ../../library/json.rst:290
391
397
msgid "The other arguments have the same meaning as in :func:`load`."
392
- msgstr ""
398
+ msgstr "其餘參數的使用方式與意義和 :func:`load` 的相同。 "
393
399
394
400
#: ../../library/json.rst:295
395
401
msgid ""
396
402
"*s* can now be of type :class:`bytes` or :class:`bytearray`. The input "
397
403
"encoding should be UTF-8, UTF-16 or UTF-32."
398
404
msgstr ""
405
+ "現在,*s* 可以是一個\\ :term:`二進位檔案 <binary file>`\\ ,前提是其編碼格式為 UTF-8、UTF-16 或 UTF-32。"
399
406
400
407
#: ../../library/json.rst:299
401
408
msgid "The keyword argument *encoding* has been removed."
402
- msgstr "關鍵字引數 *encoding* 已經被刪除 。"
409
+ msgstr "刪除關鍵字參數 *encoding*。"
403
410
404
411
#: ../../library/json.rst:304
405
412
msgid "Encoders and Decoders"
406
- msgstr ""
413
+ msgstr "編碼器與解碼器 "
407
414
408
415
#: ../../library/json.rst:308
409
416
msgid "Simple JSON decoder."
410
- msgstr ""
417
+ msgstr "簡易 JSON 解碼器 "
411
418
412
419
#: ../../library/json.rst:310
413
420
msgid "Performs the following translations in decoding by default:"
414
- msgstr ""
421
+ msgstr "預設將執行下列資料型別轉換: "
415
422
416
423
#: ../../library/json.rst:315 ../../library/json.rst:404
417
424
msgid "JSON"
@@ -490,6 +497,7 @@ msgid ""
490
497
"It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their "
491
498
"corresponding ``float`` values, which is outside the JSON spec."
492
499
msgstr ""
500
+ "雖然 ``NaN``、``Infinity`` 和 ``-Infinity`` 並不符合 JSON 規範,解碼器依然能正確的將其對應到相應的 Python ``float`` 值。"
493
501
494
502
#: ../../library/json.rst:337
495
503
msgid ""
@@ -498,6 +506,10 @@ msgid ""
498
506
"class:`dict`. This can be used to provide custom deserializations (e.g. to "
499
507
"support `JSON-RPC <https://www.jsonrpc.org>`_ class hinting)."
500
508
msgstr ""
509
+ "*object_hook* 是一個可選參數,其接受一個函數作為輸入。原始的字串解碼結果(一個 :class:"
510
+ "`dict`\\ )將被傳入這個函數、並使用 *object_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此功"
511
+ "能可用於實作自訂義解碼器(例如 `JSON-RPC <https://www.jsonrpc.org>`_ 類別提"
512
+ "示)。"
501
513
502
514
#: ../../library/json.rst:342
503
515
msgid ""
@@ -507,9 +519,11 @@ msgid ""
507
519
"can be used to implement custom decoders. If *object_hook* is also defined, "
508
520
"the *object_pairs_hook* takes priority."
509
521
msgstr ""
510
- "若給定了 *object_pairs_hook*,則會在每次解碼 JSON 物件後,將結果作為一對有序列表傳入 *object_pairs_hook* 中。"
511
- "*object_pairs_hook* 的回傳值將取代 :class:`dictionary`。這個功能可以用來實作自定義的解碼器。"
512
- "如果還同時定義了 *object_hook*,則本 *object_pairs_hook* 具有優先權。"
522
+ "*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對列表(ordered list of pairs)解碼"
523
+ "結果將被傳入這個函數、並使用 *object_pairs_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此"
524
+ "功能可用於實作自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* "
525
+ "優先。"
526
+
513
527
514
528
#: ../../library/json.rst:366
515
529
msgid ""
@@ -518,10 +532,11 @@ msgid ""
518
532
"with character codes in the 0--31 range, including ``'\\ t'`` (tab), "
519
533
"``'\\ n'``, ``'\\ r'`` and ``'\\ 0'``."
520
534
msgstr ""
535
+ "如果 *strict* 被設為 false(預設值為 ``True``),那麼字串中將允許控制字元。此語境中的控制字元指的是 ASCII 字元編碼在 0~31 範圍內的字元,包括 ``'\\ t'``(tab 鍵)、``'\\ n'``、``'\\ r'`` 和 ``'\\ 0'``。"
521
536
522
537
#: ../../library/json.rst:374 ../../library/json.rst:475
523
538
msgid "All parameters are now :ref:`keyword-only <keyword-only_parameter>`."
524
- msgstr ""
539
+ msgstr "所有可選參數現在都是 \\ :ref:`僅限關鍵字 <keyword-only_parameter>` \\ 參數了。 "
525
540
526
541
#: ../../library/json.rst:379
527
542
msgid ""
0 commit comments