@@ -104,15 +104,15 @@ msgstr ""
104
104
"JSON 語法是 `YAML <https://yaml.org/>`_ 1.2 語法的一種子集合。所以如果使用預"
105
105
"設的設定的話(準確來說,使用預設的 *separators* 分隔符設定的話),這個模組的"
106
106
"輸出也符合 YAML 1.0 和 1.1 的子集合規範。因此你也可以利用這個模組來當作 YAML "
107
- "的串列化工具 (serializer)。"
107
+ "的序列化工具 (serializer)。"
108
108
109
109
#: ../../library/json.rst:130
110
110
msgid ""
111
111
"This module's encoders and decoders preserve input and output order by "
112
112
"default. Order is only lost if the underlying containers are unordered."
113
113
msgstr ""
114
114
"這個模組的編、解碼器預設會保存輸入與輸出資料的順序關係,除非一開始的輸入本身"
115
- "就是無序的。(例如集合) "
115
+ "就是無序的。"
116
116
117
117
#: ../../library/json.rst:135
118
118
msgid "Basic Usage"
@@ -124,8 +124,8 @@ msgid ""
124
124
"supporting :term:`file-like object`) using this :ref:`conversion table <py-"
125
125
"to-json-table>`."
126
126
msgstr ""
127
- "參考這個\\ :ref:`轉換表 <py-to-json-table>`\\ 將 *obj* 串列化為符合 JSON 格式"
128
- "的字串流 ,並寫入到 *fp* (一個支援 ``.write()`` 方法的 :term:`file-like "
127
+ "參考這個\\ :ref:`轉換表 <py-to-json-table>`\\ 將 *obj* 序列化為符合 JSON 格式"
128
+ "的串流 ,並寫入到 *fp* (一個支援 ``.write()`` 方法的 :term:`file-like "
129
129
"object`)"
130
130
131
131
#: ../../library/json.rst:146
@@ -135,7 +135,7 @@ msgid ""
135
135
"``None``) will be skipped instead of raising a :exc:`TypeError`."
136
136
msgstr ""
137
137
"如果 *skipkeys* 被設為 true(預設值:``False``),那麼非基本型別(:class:"
138
- "`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``)的 dictionary"
138
+ "`str`、 :class:`int`、 :class:`float`、 :class:`bool`、 ``None``)的 dictionary"
139
139
"(字典)鍵值將被略過而不會引發 :exc:`TypeError`。"
140
140
141
141
#: ../../library/json.rst:150
@@ -173,7 +173,7 @@ msgid ""
173
173
"*allow_nan* is true, their JavaScript equivalents (``NaN``, ``Infinity``, ``-"
174
174
"Infinity``) will be used."
175
175
msgstr ""
176
- "如果 *allow_nan* 為 false(預設值:``True``\\ ),則串列化不符合嚴格 JSON 規"
176
+ "如果 *allow_nan* 為 false(預設值:``True``\\ ),則序列化不符合嚴格 JSON 規"
177
177
"範的 :class:`float` 值 (``nan``, ``inf``, ``-inf``) 會引發 :exc:"
178
178
"`ValueError`。如果 *allow_nan* 為 true,則將使用它們的 JavaScript 等效表示 "
179
179
"(``NaN``, ``Infinity``, ``-Infinity``)。"
@@ -203,7 +203,7 @@ msgid ""
203
203
"': ')`` otherwise. To get the most compact JSON representation, you should "
204
204
"specify ``(',', ':')`` to eliminate whitespace."
205
205
msgstr ""
206
- "如果有指定本參數 ,*separators* 應該是一個 ``(item_separator, "
206
+ "如果有指定本引數內容 ,*separators* 應該是一個 ``(item_separator, "
207
207
"key_separator)`` 二元組。如果 *indent* 為 ``None`` 則預設為 ``(', ', ': "
208
208
"')``,否則預設為 ``(',', ': ')``。想要獲得最緊湊的 JSON 表示形式,你可以改成"
209
209
"指定 ``(',', ':')`` 來消除尾隨的空格。"
@@ -219,8 +219,8 @@ msgid ""
219
219
"version of the object or raise a :exc:`TypeError`. If not specified, :exc:"
220
220
"`TypeError` is raised."
221
221
msgstr ""
222
- "如果有指定本參數,*default* 會是一個遭遇無法串列化的物件時會被呼叫的函式 。它"
223
- "應該傳回該物件的 JSON 可編碼版本或引發 :exc:`TypeError`。如果未指定,則會直接"
222
+ "如果有指定本參數,*default* 會是一個遭遇無法序列化的物件時會被呼叫的函式 。它"
223
+ "應該回傳該物件的 JSON 可編碼版本或引發 :exc:`TypeError`。如果未指定,則會直接"
224
224
"引發 :exc:`TypeError`。"
225
225
226
226
#: ../../library/json.rst:191
@@ -237,7 +237,7 @@ msgid ""
237
237
"it with the *cls* kwarg; otherwise :class:`JSONEncoder` is used."
238
238
msgstr ""
239
239
"若要使用繼承自 :class:`JSONEncoder` 的自訂子類別(例如覆寫 :meth:"
240
- "`~JSONEncoder.default` 方法來串列化其他型別的一個子類別物件 ),請使用關鍵字參"
240
+ "`~JSONEncoder.default` 方法來序列化其他型別的一個子類別物件 ),請使用關鍵字參"
241
241
"數 *cls* 指定該類別物件;否則預設使用 :class:`JSONEncoder`。"
242
242
243
243
#: ../../library/json.rst:198 ../../library/json.rst:277
@@ -255,7 +255,7 @@ msgid ""
255
255
"using the same *fp* will result in an invalid JSON file."
256
256
msgstr ""
257
257
"與 :mod:`pickle` 和 :mod:`marshal` 不同,JSON 不具有二進位分框(binary "
258
- "framed)的協定,因此嘗試重複呼叫 :func:`dump` 來串列化多個物件到同一個 *fp* "
258
+ "framed)的協定,因此嘗試重複呼叫 :func:`dump` 來序列化多個物件到同一個 *fp* "
259
259
"裡將導致無效的 JSON 檔案。"
260
260
261
261
#: ../../library/json.rst:212
@@ -264,8 +264,8 @@ msgid ""
264
264
"table <py-to-json-table>`. The arguments have the same meaning as in :func:"
265
265
"`dump`."
266
266
msgstr ""
267
- "使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *obj* 串列化為 JSON 格式 :"
268
- "class:`str`。這個參數的作用與 :func:`dump` 中的同名參數意義相同 。"
267
+ "使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *obj* 序列化為 JSON 格式 :"
268
+ "class:`str`。這個引數的作用與 :func:`dump` 中的同名引數意義相同 。"
269
269
270
270
#: ../../library/json.rst:218
271
271
msgid ""
@@ -288,7 +288,7 @@ msgid ""
288
288
msgstr ""
289
289
"使用此\\ :ref:`轉換表 <json-to-py-table>`\\ 來將 *fp*\\ (一個支援 ``."
290
290
"read()``、包含 JSON 文件的\\ :term:`文字檔案 <text file>`\\ 或\\ :term:`二進"
291
- "位檔案 <binary file>`\\ )去串列化為 Python 物件。"
291
+ "位檔案 <binary file>`\\ )去序列化為 Python 物件。"
292
292
293
293
#: ../../library/json.rst:231
294
294
msgid ""
@@ -311,7 +311,7 @@ msgid ""
311
311
"`dict`. This feature can be used to implement custom decoders. If "
312
312
"*object_hook* is also defined, the *object_pairs_hook* takes priority."
313
313
msgstr ""
314
- "*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對列表 "
314
+ "*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對串列 "
315
315
"(ordered list of pairs)解碼結果將被傳入這個函數、並使用 "
316
316
"*object_pairs_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此功能可用於實作"
317
317
"自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
@@ -375,7 +375,7 @@ msgid ""
375
375
"kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments "
376
376
"will be passed to the constructor of the class."
377
377
msgstr ""
378
- "若想要使用自定義的 :class:`JSONDecoder` 子類別物件,請以 ``cls`` 關鍵字參數指 "
378
+ "若想要使用自定義的 :class:`JSONDecoder` 子類別物件,請以 ``cls`` 關鍵字引數指 "
379
379
"定之,否則將使用預設的 :class:`JSONDecoder`。其他未使用到的關鍵字參數將繼續傳"
380
380
"入給 JSONDecoder 的建構函數使用。"
381
381
@@ -385,7 +385,7 @@ msgid ""
385
385
"If the data being deserialized is not a valid JSON document, a :exc:"
386
386
"`JSONDecodeError` will be raised."
387
387
msgstr ""
388
- "如果被去串列化 (deserialized)的資料不符合 JSON 格式,將會引發 :exc:"
388
+ "如果被去序列化 (deserialized)的資料不符合 JSON 格式,將會引發 :exc:"
389
389
"`JSONDecodeError` 例外。"
390
390
391
391
#: ../../library/json.rst:280
@@ -404,11 +404,11 @@ msgid ""
404
404
msgstr ""
405
405
"使用\\ :ref:`轉換表 <json-to-py-table>`\\ 將 *s* (一個含有 JSON 文件的 :"
406
406
"class:`str`\\ 、\\ :class:`bytes` 或 :class:`bytearray` 的實例(instance))"
407
- "去串列化 (deserialize)為一個 Python 物件"
407
+ "去序列化 (deserialize)為一個 Python 物件"
408
408
409
409
#: ../../library/json.rst:290
410
410
msgid "The other arguments have the same meaning as in :func:`load`."
411
- msgstr "其餘參數的使用方式與意義和 :func:`load` 的相同。"
411
+ msgstr "其餘引數的使用方式與意義和 :func:`load` 的相同。"
412
412
413
413
#: ../../library/json.rst:295
414
414
msgid ""
@@ -420,7 +420,7 @@ msgstr ""
420
420
421
421
#: ../../library/json.rst:299
422
422
msgid "The keyword argument *encoding* has been removed."
423
- msgstr "刪除關鍵字參數 *encoding*。"
423
+ msgstr "刪除關鍵字引數 *encoding*。"
424
424
425
425
#: ../../library/json.rst:304
426
426
msgid "Encoders and Decoders"
@@ -534,7 +534,7 @@ msgid ""
534
534
"can be used to implement custom decoders. If *object_hook* is also defined, "
535
535
"the *object_pairs_hook* takes priority."
536
536
msgstr ""
537
- "*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對列表 "
537
+ "*object_pairs_hook* 是一個可選參數,其接受一個函數作為輸入。原始的有序對串列 "
538
538
"(ordered list of pairs)解碼結果將被傳入這個函數、並使用 "
539
539
"*object_pairs_hook* 的回傳值來取代原先的 :class:`dict` 輸出。此功能可用於實作"
540
540
"自訂義解碼器。如果也同時給定了 *object_hook*,則 *object_pairs_hook* 優先。"
@@ -635,7 +635,7 @@ msgid ""
635
635
"prevent an infinite recursion (which would cause a :exc:`RecursionError`). "
636
636
"Otherwise, no such check takes place."
637
637
msgstr ""
638
- "如果 *check_circular* 為 true(預設值),則會在編碼期間檢查列表 (list)、字典"
638
+ "如果 *check_circular* 為 true(預設值),則會在編碼期間檢查串列 (list)、字典"
639
639
"(dict)和自定義編碼物件的循環參照,以防止無限遞迴(一個會導致 :exc:"
640
640
"`RecursionError` 例外的問題)。否則不會進行此類檢查。"
641
641
@@ -667,7 +667,7 @@ msgid ""
667
667
"object for *o*, or calls the base implementation (to raise a :exc:"
668
668
"`TypeError`)."
669
669
msgstr ""
670
- "在任意一個子類別裡實作這個方法時須讓其回傳一個可串列化的物件 *o* ,或呼叫原始"
670
+ "在任意一個子類別裡實作這個方法時須讓其回傳一個可序列化的物件 *o* ,或呼叫原始"
671
671
"的實作以引發 :exc:`TypeError` 例外。"
672
672
673
673
#: ../../library/json.rst:485
@@ -768,7 +768,7 @@ msgid ""
768
768
"under default settings."
769
769
msgstr ""
770
770
"不過 RFC 准許遵循 RFC 的剖析器接受不合規的文字輸入,所以技術上來說若以預設設"
771
- "定運作,本模組的去串列化器 (deserializer)是符合 RFC 規範的。"
771
+ "定運作,本模組的去序列化器 (deserializer)是符合 RFC 規範的。"
772
772
773
773
#: ../../library/json.rst:568
774
774
msgid "Character Encodings"
@@ -799,8 +799,8 @@ msgid ""
799
799
"<str>`, and thus does not otherwise directly address the issue of character "
800
800
"encodings."
801
801
msgstr ""
802
- "除了 *ensure_ascii* 選項之外 ,本模組嚴格遵循 Python 物件與 :class:`Unicode "
803
- "strings <str>` 之間的轉換規範,因此並不另外處理字元編碼的問題。"
802
+ "除了 *ensure_ascii* 選項參數之外 ,本模組嚴格遵循 Python 物件與 :class:"
803
+ "`Unicode strings <str>` 之間的轉換規範,因此並不另外處理字元編碼的問題。"
804
804
805
805
#: ../../library/json.rst:582
806
806
msgid ""
@@ -810,9 +810,9 @@ msgid ""
810
810
"in their input. This module's deserializer raises a :exc:`ValueError` when "
811
811
"an initial BOM is present."
812
812
msgstr ""
813
- "RFC 禁止在文件的開頭加上端序記號(BOM),因此本模組的串列化器 (serializer)也"
814
- "不會在輸出中加入端序記號。RFC 允許但不強制 JSON 去串列化器 (deserializer)忽"
815
- "略文件初始的端序記號,因此本模組的去串列化器將在遭遇位於文件開頭的端序記號時 "
813
+ "RFC 禁止在文件的開頭加上端序記號(BOM),因此本模組的序列化器 (serializer)也"
814
+ "不會在輸出中加入端序記號。RFC 允許但不強制 JSON 去序列化器 (deserializer)忽"
815
+ "略文件初始的端序記號,因此本模組的去序列化器將在遭遇位於文件開頭的端序記號時 "
816
816
"引發 :exc:`ValueError` 例外。"
817
817
818
818
#: ../../library/json.rst:588
@@ -847,7 +847,7 @@ msgid ""
847
847
"behavior. In the deserializer, the *parse_constant* parameter can be used "
848
848
"to alter this behavior."
849
849
msgstr ""
850
- "在串列化器中 ,*allow_nan* 參數可以改變這個行為。在去串列化器中 ,"
850
+ "在序列化器中 ,*allow_nan* 參數可以改變這個行為。在去序列化器中 ,"
851
851
"*parse_constant* 參數可以改變這個行為。"
852
852
853
853
#: ../../library/json.rst:619
@@ -884,7 +884,7 @@ msgid ""
884
884
msgstr ""
885
885
"由已廢棄的 :rfc:`4627` 所規範的舊版 JSON 要求 JSON 文字的頂層值必須是 JSON 物"
886
886
"件或陣列(Python :class:`dict` 或 :class:`list`),而且不能是 JSON 的 null、"
887
- "boolean、數字或字串值。 :rfc:`7159` 移除了這個限制,而本模組的串列化器或去串 "
887
+ "boolean、數字或字串值。 :rfc:`7159` 移除了這個限制,而本模組的序列化器或去串 "
888
888
"列化器中未曾實施過該限制。"
889
889
890
890
#: ../../library/json.rst:643
@@ -899,7 +899,7 @@ msgstr "實作限制"
899
899
900
900
#: ../../library/json.rst:650
901
901
msgid "Some JSON deserializer implementations may set limits on:"
902
- msgstr "某些 JSON 去串列化器的實作可能會造成下列限制 :"
902
+ msgstr "某些 JSON 去序列化器的實作可能會造成下列限制 :"
903
903
904
904
#: ../../library/json.rst:652
905
905
msgid "the size of accepted JSON texts"
@@ -935,8 +935,8 @@ msgid ""
935
935
"magnitude, or when serializing instances of \" exotic\" numerical types such "
936
936
"as :class:`decimal.Decimal`."
937
937
msgstr ""
938
- "將資料串列化為 JSON 時,要注意可能會使用該 JSON 輸出的應用程式中的相關限制。"
939
- "特別要注意的是,JSON 數字常會被去串列化為 IEEE 754 雙精度浮點數(double),並"
938
+ "將資料序列化為 JSON 時,要注意可能會使用該 JSON 輸出的應用程式中的相關限制。"
939
+ "特別要注意的是,JSON 數字常會被去序列化為 IEEE 754 雙精度浮點數(double),並"
940
940
"因而受到其表示範圍和精度限制的影響。這在序列化極大的 Python :class:`int` 數"
941
941
"值、或是序列化特殊數字型別的實例時(例如 :class:`decimal.Decimal`)尤其重要。"
942
942
@@ -960,15 +960,15 @@ msgid ""
960
960
"If the optional ``infile`` and ``outfile`` arguments are not specified, :"
961
961
"data:`sys.stdin` and :data:`sys.stdout` will be used respectively:"
962
962
msgstr ""
963
- "如果沒有指定可選參數 ``infile`` 和 ``outfile`` ,則 :data:`sys.stdin` 和 :"
963
+ "如果沒有指定可選引數 ``infile`` 和 ``outfile`` ,則 :data:`sys.stdin` 和 :"
964
964
"data:`sys.stdout` 將各自做為輸入和輸出的預設值。"
965
965
966
966
#: ../../library/json.rst:697
967
967
msgid ""
968
968
"The output is now in the same order as the input. Use the :option:`--sort-"
969
969
"keys` option to sort the output of dictionaries alphabetically by key."
970
970
msgstr ""
971
- "現在開始輸出和輸入的資料順序會是相同的。傳入 :option:`--sort-keys` 參數以按照 "
971
+ "現在開始輸出和輸入的資料順序會是相同的。傳入 :option:`--sort-keys` 引數以按照 "
972
972
"鍵值的字母順序對輸出進行排序。"
973
973
974
974
#: ../../library/json.rst:704
0 commit comments