-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathjson.po
More file actions
1371 lines (1188 loc) · 53.1 KB
/
Copy pathjson.po
File metadata and controls
1371 lines (1188 loc) · 53.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
# Takanori Suzuki <takanori@takanory.net>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-21 18:58+0000\n"
"PO-Revision-Date: 2025-09-16 00:01+0000\n"
"Last-Translator: Takanori Suzuki <takanori@takanory.net>, 2026\n"
"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/json.rst:2
msgid ":mod:`!json` --- JSON encoder and decoder"
msgstr ":mod:`!json` --- JSON エンコーダーとデコーダー"
#: ../../library/json.rst:7
msgid "**Source code:** :source:`Lib/json/__init__.py`"
msgstr "**ソースコード:** :source:`Lib/json/__init__.py`"
#: ../../library/json.rst:11
msgid ""
"`JSON (JavaScript Object Notation) <https://json.org>`_, specified by :rfc:"
"`7159` (which obsoletes :rfc:`4627`) and by `ECMA-404 <https://ecma-"
"international.org/publications-and-standards/standards/ecma-404/>`_, is a "
"lightweight data interchange format inspired by `JavaScript <https://en."
"wikipedia.org/wiki/JavaScript>`_ object literal syntax (although it is not a "
"strict subset of JavaScript [#rfc-errata]_ )."
msgstr ""
"`JSON (JavaScript Object Notation) <https://json.org>`_ は、 :rfc:`7159` (:"
"rfc:`4627` を obsolete) と `ECMA-404 <https://ecma-international.org/"
"publications-and-standards/standards/ecma-404/>`_ によって定義された軽量の"
"データ交換用のフォーマットです。 JavaScript のオブジェクトリテラル記法に由来"
"しています (`JavaScript <https://en.wikipedia.org/wiki/JavaScript>`_ の厳密な"
"サブセットではありませんが [#rfc-errata]_)。"
#: ../../library/json.rst:19
msgid ""
"The term \"object\" in the context of JSON processing in Python can be "
"ambiguous. All values in Python are objects. In JSON, an object refers to "
"any data wrapped in curly braces, similar to a Python dictionary."
msgstr ""
#: ../../library/json.rst:24
msgid ""
"Be cautious when parsing JSON data from untrusted sources. A malicious JSON "
"string may cause the decoder to consume considerable CPU and memory "
"resources. Limiting the size of data to be parsed is recommended."
msgstr ""
"信頼されていないソースからの JSON データをパースするときは十分注意してくださ"
"い。悪意を持った JSON 文字列はデコーダに著しい量の CPU とメモリリソースを消費"
"させる可能性があります。パースするデータ量を制限することを推奨します。"
#: ../../library/json.rst:28
msgid ""
"This module exposes an API familiar to users of the standard library :mod:"
"`marshal` and :mod:`pickle` modules."
msgstr ""
"このモジュールの API は標準ライブラリの :mod:`marshal` や :mod:`pickle` の"
"ユーザに馴染み深いものです。"
#: ../../library/json.rst:31
msgid "Encoding basic Python object hierarchies::"
msgstr "基本的な Python オブジェクト階層のエンコーディング::"
#: ../../library/json.rst:33
msgid ""
">>> import json\n"
">>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])\n"
"'[\"foo\", {\"bar\": [\"baz\", null, 1.0, 2]}]'\n"
">>> print(json.dumps(\"\\\"foo\\bar\"))\n"
"\"\\\"foo\\bar\"\n"
">>> print(json.dumps('\\u1234'))\n"
"\"\\u1234\"\n"
">>> print(json.dumps('\\\\'))\n"
"\"\\\\\"\n"
">>> print(json.dumps({\"c\": 0, \"b\": 0, \"a\": 0}, sort_keys=True))\n"
"{\"a\": 0, \"b\": 0, \"c\": 0}\n"
">>> from io import StringIO\n"
">>> io = StringIO()\n"
">>> json.dump(['streaming API'], io)\n"
">>> io.getvalue()\n"
"'[\"streaming API\"]'"
msgstr ""
">>> import json\n"
">>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])\n"
"'[\"foo\", {\"bar\": [\"baz\", null, 1.0, 2]}]'\n"
">>> print(json.dumps(\"\\\"foo\\bar\"))\n"
"\"\\\"foo\\bar\"\n"
">>> print(json.dumps('\\u1234'))\n"
"\"\\u1234\"\n"
">>> print(json.dumps('\\\\'))\n"
"\"\\\\\"\n"
">>> print(json.dumps({\"c\": 0, \"b\": 0, \"a\": 0}, sort_keys=True))\n"
"{\"a\": 0, \"b\": 0, \"c\": 0}\n"
">>> from io import StringIO\n"
">>> io = StringIO()\n"
">>> json.dump(['streaming API'], io)\n"
">>> io.getvalue()\n"
"'[\"streaming API\"]'"
#: ../../library/json.rst:50
msgid "Compact encoding::"
msgstr "コンパクトなエンコーディング::"
#: ../../library/json.rst:52
msgid ""
">>> import json\n"
">>> json.dumps([1, 2, 3, {'4': 5, '6': 7}], separators=(',', ':'))\n"
"'[1,2,3,{\"4\":5,\"6\":7}]'"
msgstr ""
">>> import json\n"
">>> json.dumps([1, 2, 3, {'4': 5, '6': 7}], separators=(',', ':'))\n"
"'[1,2,3,{\"4\":5,\"6\":7}]'"
#: ../../library/json.rst:56
msgid "Pretty printing::"
msgstr "見やすい表示::"
#: ../../library/json.rst:58
msgid ""
">>> import json\n"
">>> print(json.dumps({'6': 7, '4': 5}, sort_keys=True, indent=4))\n"
"{\n"
" \"4\": 5,\n"
" \"6\": 7\n"
"}"
msgstr ""
">>> import json\n"
">>> print(json.dumps({'6': 7, '4': 5}, sort_keys=True, indent=4))\n"
"{\n"
" \"4\": 5,\n"
" \"6\": 7\n"
"}"
#: ../../library/json.rst:65
msgid "Customizing JSON object encoding::"
msgstr "JSON オブジェクトのエンコーディング方法をカスタマイズする::"
#: ../../library/json.rst:67
msgid ""
">>> import json\n"
">>> def custom_json(obj):\n"
"... if isinstance(obj, complex):\n"
"... return {'__complex__': True, 'real': obj.real, 'imag': obj."
"imag}\n"
"... raise TypeError(f'Cannot serialize object of {type(obj)}')\n"
"...\n"
">>> json.dumps(1 + 2j, default=custom_json)\n"
"'{\"__complex__\": true, \"real\": 1.0, \"imag\": 2.0}'"
msgstr ""
">>> import json\n"
">>> def custom_json(obj):\n"
"... if isinstance(obj, complex):\n"
"... return {'__complex__': True, 'real': obj.real, 'imag': obj."
"imag}\n"
"... raise TypeError(f'Cannot serialize object of {type(obj)}')\n"
"...\n"
">>> json.dumps(1 + 2j, default=custom_json)\n"
"'{\"__complex__\": true, \"real\": 1.0, \"imag\": 2.0}'"
#: ../../library/json.rst:76
msgid "Decoding JSON::"
msgstr "JSON のデコーディング::"
#: ../../library/json.rst:78
msgid ""
">>> import json\n"
">>> json.loads('[\"foo\", {\"bar\":[\"baz\", null, 1.0, 2]}]')\n"
"['foo', {'bar': ['baz', None, 1.0, 2]}]\n"
">>> json.loads('\"\\\\\"foo\\\\bar\"')\n"
"'\"foo\\x08ar'\n"
">>> from io import StringIO\n"
">>> io = StringIO('[\"streaming API\"]')\n"
">>> json.load(io)\n"
"['streaming API']"
msgstr ""
">>> import json\n"
">>> json.loads('[\"foo\", {\"bar\":[\"baz\", null, 1.0, 2]}]')\n"
"['foo', {'bar': ['baz', None, 1.0, 2]}]\n"
">>> json.loads('\"\\\\\"foo\\\\bar\"')\n"
"'\"foo\\x08ar'\n"
">>> from io import StringIO\n"
">>> io = StringIO('[\"streaming API\"]')\n"
">>> json.load(io)\n"
"['streaming API']"
#: ../../library/json.rst:88
msgid "Customizing JSON object decoding::"
msgstr "JSON オブジェクトのデコーディング方法をカスタマイズする::"
#: ../../library/json.rst:90
msgid ""
">>> import json\n"
">>> def as_complex(dct):\n"
"... if '__complex__' in dct:\n"
"... return complex(dct['real'], dct['imag'])\n"
"... return dct\n"
"...\n"
">>> json.loads('{\"__complex__\": true, \"real\": 1, \"imag\": 2}',\n"
"... object_hook=as_complex)\n"
"(1+2j)\n"
">>> import decimal\n"
">>> json.loads('1.1', parse_float=decimal.Decimal)\n"
"Decimal('1.1')"
msgstr ""
">>> import json\n"
">>> def as_complex(dct):\n"
"... if '__complex__' in dct:\n"
"... return complex(dct['real'], dct['imag'])\n"
"... return dct\n"
"...\n"
">>> json.loads('{\"__complex__\": true, \"real\": 1, \"imag\": 2}',\n"
"... object_hook=as_complex)\n"
"(1+2j)\n"
">>> import decimal\n"
">>> json.loads('1.1', parse_float=decimal.Decimal)\n"
"Decimal('1.1')"
#: ../../library/json.rst:103
msgid "Extending :class:`JSONEncoder`::"
msgstr ":class:`JSONEncoder` の拡張::"
#: ../../library/json.rst:105
msgid ""
">>> import json\n"
">>> class ComplexEncoder(json.JSONEncoder):\n"
"... def default(self, obj):\n"
"... if isinstance(obj, complex):\n"
"... return [obj.real, obj.imag]\n"
"... # Let the base class default method raise the TypeError\n"
"... return super().default(obj)\n"
"...\n"
">>> json.dumps(2 + 1j, cls=ComplexEncoder)\n"
"'[2.0, 1.0]'\n"
">>> ComplexEncoder().encode(2 + 1j)\n"
"'[2.0, 1.0]'\n"
">>> list(ComplexEncoder().iterencode(2 + 1j))\n"
"['[2.0', ', 1.0', ']']"
msgstr ""
#: ../../library/json.rst:121
msgid "Using :mod:`!json` from the shell to validate and pretty-print:"
msgstr ""
#: ../../library/json.rst:123
msgid ""
"$ echo '{\"json\":\"obj\"}' | python -m json\n"
"{\n"
" \"json\": \"obj\"\n"
"}\n"
"$ echo '{1.2:3.4}' | python -m json\n"
"Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"
msgstr ""
"$ echo '{\"json\":\"obj\"}' | python -m json\n"
"{\n"
" \"json\": \"obj\"\n"
"}\n"
"$ echo '{1.2:3.4}' | python -m json\n"
"Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"
#: ../../library/json.rst:132
msgid "See :ref:`json-commandline` for detailed documentation."
msgstr "詳細については :ref:`json-commandline` を参照してください。"
#: ../../library/json.rst:136
msgid ""
"JSON is a subset of `YAML <https://yaml.org/>`_ 1.2. The JSON produced by "
"this module's default settings (in particular, the default *separators* "
"value) is also a subset of YAML 1.0 and 1.1. This module can thus also be "
"used as a YAML serializer."
msgstr ""
"JSON は `YAML <https://yaml.org/>`_ 1.2 のサブセットです。このモジュールのデ"
"フォルト設定 (特に、デフォルトの *セパレータ* 値) で生成される JSON は YAML "
"1.0 および 1.1 のサブセットでもあります。このモジュールは YAML シリアライザと"
"しても使えます。"
#: ../../library/json.rst:143
msgid ""
"This module's encoders and decoders preserve input and output order by "
"default. Order is only lost if the underlying containers are unordered."
msgstr ""
"このモジュールのエンコーダとデコーダは、デフォルトで入力順と出力順を保つよう"
"になっています。根底のコンテナに順序がない場合のみ、順序が失われます。"
#: ../../library/json.rst:148
msgid "Basic Usage"
msgstr "基本的な使い方"
#: ../../library/json.rst:155
msgid ""
"Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-"
"supporting :term:`file-like object`) using this :ref:`Python-to-JSON "
"conversion table <py-to-json-table>`."
msgstr ""
"この :ref:`PythonからJSONへの変換表 <py-to-json-table>` を使って、 *obj* を "
"JSON 形式の *fp* (``.write()`` がサポートされている :term:`file-like "
"object`) へのストリームとして直列化します。"
#: ../../library/json.rst:161
msgid ""
"Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol, so "
"trying to serialize multiple objects with repeated calls to :func:`dump` "
"using the same *fp* will result in an invalid JSON file."
msgstr ""
":mod:`pickle` や :mod:`marshal` とは異なり JSON はフレーム付きのプロトコルで"
"はないので、同じ *fp* に対し繰り返し :func:`dump` を呼び、複数のオブジェクト"
"を直列化しようとすると、不正な JSON ファイルが作られてしまいます。"
#: ../../library/json.rst:0
msgid "Parameters"
msgstr "パラメーター"
#: ../../library/json.rst:165
msgid "The Python object to be serialized."
msgstr ""
#: ../../library/json.rst:168
msgid ""
"The file-like object *obj* will be serialized to. The :mod:`!json` module "
"always produces :class:`str` objects, not :class:`bytes` objects, therefore "
"``fp.write()`` must support :class:`str` input."
msgstr ""
#: ../../library/json.rst:175
msgid ""
"If ``True``, keys that are not of a basic type (:class:`str`, :class:`int`, :"
"class:`float`, :class:`bool`, ``None``) will be skipped instead of raising "
"a :exc:`TypeError`. Default ``False``."
msgstr ""
#: ../../library/json.rst:181
msgid ""
"If ``True`` (the default), the output is guaranteed to have all incoming non-"
"ASCII and non-printable characters escaped. If ``False``, all characters "
"will be outputted as-is, except for the characters that must be escaped: "
"quotation mark, reverse solidus, and the control characters U+0000 through "
"U+001F."
msgstr ""
#: ../../library/json.rst:188
msgid ""
"If ``False``, the circular reference check for container types is skipped "
"and a circular reference will result in a :exc:`RecursionError` (or worse). "
"Default ``True``."
msgstr ""
#: ../../library/json.rst:193
msgid ""
"If ``False``, serialization of out-of-range :class:`float` values (``nan``, "
"``inf``, ``-inf``) will result in a :exc:`ValueError`, in strict compliance "
"with the JSON specification. If ``True`` (the default), their JavaScript "
"equivalents (``NaN``, ``Infinity``, ``-Infinity``) are used."
msgstr ""
#: ../../library/json.rst:200
msgid ""
"If set, a custom JSON encoder with the :meth:`~JSONEncoder.default` method "
"overridden, for serializing into custom datatypes. If ``None`` (the "
"default), :class:`!JSONEncoder` is used."
msgstr ""
#: ../../library/json.rst:207
msgid ""
"If a positive integer or string, JSON array elements and object members will "
"be pretty-printed with that indent level. A positive integer indents that "
"many spaces per level; a string (such as ``\"\\t\"``) is used to indent each "
"level. If zero, negative, or ``\"\"`` (the empty string), only newlines are "
"inserted. If ``None`` (the default), no newlines are inserted."
msgstr ""
#: ../../library/json.rst:217
msgid ""
"A two-tuple: ``(item_separator, key_separator)``. If ``None`` (the default), "
"*separators* defaults to ``(', ', ': ')`` if *indent* is ``None``, and "
"``(',', ': ')`` otherwise. For the most compact JSON, specify ``(',', ':')`` "
"to eliminate whitespace."
msgstr ""
#: ../../library/json.rst:226
msgid ""
"A function that is called for objects that can't otherwise be serialized. It "
"should return a JSON encodable version of the object or raise a :exc:"
"`TypeError`. If ``None`` (the default), :exc:`!TypeError` is raised."
msgstr ""
#: ../../library/json.rst:233
msgid ""
"If ``True``, dictionaries will be outputted sorted by key. Default ``False``."
msgstr ""
#: ../../library/json.rst:239
msgid ""
"Keys in key/value pairs of JSON are always of the type :class:`str`. When a "
"dictionary is converted into JSON, all the keys of the dictionary are "
"converted to strings. As a result of this, if a dictionary is converted into "
"JSON and then back into a dictionary, the dictionary may not equal the "
"original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys. "
"*sort_keys* sorts the keys before they are converted to strings, so numeric "
"keys are sorted by value, not by their string representation."
msgstr ""
#: ../../library/json.rst:247 ../../library/json.rst:548
msgid "Allow strings for *indent* in addition to integers."
msgstr "整数に加えて、文字列が *indent* に使用できるようになりました。"
#: ../../library/json.rst:250 ../../library/json.rst:556
msgid "Use ``(',', ': ')`` as default if *indent* is not ``None``."
msgstr ""
"*indent* が ``None`` でなければ ``(',', ': ')`` がデフォルトで使われます。"
#: ../../library/json.rst:253 ../../library/json.rst:352
msgid ""
"All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`."
msgstr ""
"すべてのオプション引数は、 :ref:`キーワード専用 <keyword-only_parameter>` に"
"なりました。 "
#: ../../library/json.rst:262
msgid ""
"Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion "
"table <py-to-json-table>`. The arguments have the same meaning as in :func:"
"`dump`."
msgstr ""
"この :ref:`変換表 <py-to-json-table>` を使って、*obj* を JSON 形式の :class:"
"`str` オブジェクトに直列化します。引数は :func:`dump` と同じ意味です。"
#: ../../library/json.rst:270
msgid ""
"Deserialize *fp* to a Python object using the :ref:`JSON-to-Python "
"conversion table <json-to-py-table>`."
msgstr ""
#: ../../library/json.rst:273
msgid ""
"A ``.read()``-supporting :term:`text file` or :term:`binary file` containing "
"the JSON document to be deserialized."
msgstr ""
#: ../../library/json.rst:278
msgid ""
"If set, a custom JSON decoder. Additional keyword arguments to :func:`!load` "
"will be passed to the constructor of *cls*. If ``None`` (the default), :"
"class:`!JSONDecoder` is used."
msgstr ""
#: ../../library/json.rst:285
msgid ""
"If set, a function that is called with the result of any JSON object literal "
"decoded (a :class:`dict`). The return value of this function will be used "
"instead of the :class:`dict`. This feature can be used to implement custom "
"decoders, for example `JSON-RPC <https://www.jsonrpc.org>`_ class hinting. "
"Default ``None``."
msgstr ""
#: ../../library/json.rst:295
msgid ""
"If set, a function that is called with the result of any JSON object literal "
"decoded with an ordered list of pairs. The return value of this function "
"will be used instead of the :class:`dict`. This feature can be used to "
"implement custom decoders. If *object_hook* is also set, *object_pairs_hook* "
"takes priority. Default ``None``."
msgstr ""
#: ../../library/json.rst:305
msgid ""
"If set, a function that is called with the result of any JSON array literal "
"decoded with as a Python list. The return value of this function will be "
"used instead of the :class:`list`. This feature can be used to implement "
"custom decoders. Default ``None``."
msgstr ""
#: ../../library/json.rst:314
msgid ""
"If set, a function that is called with the string of every JSON float to be "
"decoded. If ``None`` (the default), it is equivalent to ``float(num_str)``. "
"This can be used to parse JSON floats into custom datatypes, for example :"
"class:`decimal.Decimal`."
msgstr ""
#: ../../library/json.rst:322
msgid ""
"If set, a function that is called with the string of every JSON int to be "
"decoded. If ``None`` (the default), it is equivalent to ``int(num_str)``. "
"This can be used to parse JSON integers into custom datatypes, for example :"
"class:`float`."
msgstr ""
#: ../../library/json.rst:330
msgid ""
"If set, a function that is called with one of the following strings: ``'-"
"Infinity'``, ``'Infinity'``, or ``'NaN'``. This can be used to raise an "
"exception if invalid JSON numbers are encountered. Default ``None``."
msgstr ""
#: ../../library/json.rst:0
msgid "Raises"
msgstr ""
#: ../../library/json.rst:338
msgid "When the data being deserialized is not a valid JSON document."
msgstr ""
#: ../../library/json.rst:341
msgid ""
"When the data being deserialized does not contain UTF-8, UTF-16 or UTF-32 "
"encoded data."
msgstr ""
#: ../../library/json.rst:347
msgid "Added the optional *object_pairs_hook* parameter."
msgstr ""
#: ../../library/json.rst:348
msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore."
msgstr "'null', 'true', 'false' に対して *parse_constant* は呼びされません。"
#: ../../library/json.rst:353
msgid ""
"*fp* can now be a :term:`binary file`. The input encoding should be UTF-8, "
"UTF-16 or UTF-32."
msgstr ""
"*fp* には :term:`binary file` 型も使えるようになりました。入力のエンコーディ"
"ングは UTF-8, UTF-16, UTF-32 のいずれかでなければなりません。"
#: ../../library/json.rst:356
msgid ""
"The default *parse_int* of :func:`int` now limits the maximum length of the "
"integer string via the interpreter's :ref:`integer string conversion length "
"limitation <int_max_str_digits>` to help avoid denial of service attacks."
msgstr ""
"デフォルトの *parse_int* である :func:`int` は、インタープリタの :ref:"
"`integer string conversion length limitation <int_max_str_digits>` により整数"
"文字列の最大長を制限するようになり、サービスを妨害する攻撃を拒否します。"
#: ../../library/json.rst:362
msgid "Added the optional *array_hook* parameter."
msgstr ""
#: ../../library/json.rst:367
msgid ""
"Identical to :func:`load`, but instead of a file-like object, deserialize "
"*s* (a :class:`str`, :class:`bytes` or :class:`bytearray` instance "
"containing a JSON document) to a Python object using this :ref:`conversion "
"table <json-to-py-table>`."
msgstr ""
#: ../../library/json.rst:372
msgid ""
"*s* can now be of type :class:`bytes` or :class:`bytearray`. The input "
"encoding should be UTF-8, UTF-16 or UTF-32."
msgstr ""
"*s* には :class:`bytes` 型と :class:`bytearray` 型も使えるようになりまし"
"た。\n"
"入力エンコーディングは UTF-8, UTF-16, UTF-32 のいずれかでなければなりません。"
#: ../../library/json.rst:376
msgid "The keyword argument *encoding* has been removed."
msgstr "キーワード引数 *encoding* が削除されました。"
#: ../../library/json.rst:381
msgid "Encoders and Decoders"
msgstr "エンコーダとデコーダ"
#: ../../library/json.rst:385
msgid "Simple JSON decoder."
msgstr "単純な JSON デコーダ。"
#: ../../library/json.rst:387
msgid "Performs the following translations in decoding by default:"
msgstr "デフォルトではデコーディングの際、以下の変換を行います:"
#: ../../library/json.rst:392 ../../library/json.rst:488
msgid "JSON"
msgstr "JSON"
#: ../../library/json.rst:392 ../../library/json.rst:488
msgid "Python"
msgstr "Python"
#: ../../library/json.rst:394 ../../library/json.rst:490
msgid "object"
msgstr "object"
#: ../../library/json.rst:394
msgid "dict"
msgstr "dict"
#: ../../library/json.rst:396 ../../library/json.rst:492
msgid "array"
msgstr "array"
#: ../../library/json.rst:396
msgid "list"
msgstr "list"
#: ../../library/json.rst:398 ../../library/json.rst:494
msgid "string"
msgstr "string"
#: ../../library/json.rst:398 ../../library/json.rst:494
msgid "str"
msgstr "str"
#: ../../library/json.rst:400
msgid "number (int)"
msgstr "number (int)"
#: ../../library/json.rst:400
msgid "int"
msgstr "int"
#: ../../library/json.rst:402
msgid "number (real)"
msgstr "number (real)"
#: ../../library/json.rst:402
msgid "float"
msgstr "浮動小数点数"
#: ../../library/json.rst:404 ../../library/json.rst:498
msgid "true"
msgstr "true"
#: ../../library/json.rst:404 ../../library/json.rst:498
msgid "True"
msgstr "True"
#: ../../library/json.rst:406 ../../library/json.rst:500
msgid "false"
msgstr "false"
#: ../../library/json.rst:406 ../../library/json.rst:500
msgid "False"
msgstr "False"
#: ../../library/json.rst:408 ../../library/json.rst:502
msgid "null"
msgstr "null"
#: ../../library/json.rst:408 ../../library/json.rst:502
msgid "None"
msgstr "None"
#: ../../library/json.rst:411
msgid ""
"It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their "
"corresponding ``float`` values, which is outside the JSON spec."
msgstr ""
"また、このデコーダは ``NaN``, ``Infinity``, ``-Infinity`` を対応する "
"``float`` の値として、JSON の仕様からは外れますが、理解します。"
#: ../../library/json.rst:414
msgid ""
"*object_hook* is an optional function that will be called with the result of "
"every JSON object decoded and its return value will be used in place of the "
"given :class:`dict`. This can be used to provide custom deserializations (e."
"g. to support `JSON-RPC <https://www.jsonrpc.org>`_ class hinting)."
msgstr ""
#: ../../library/json.rst:419
msgid ""
"*object_pairs_hook* is an optional function that will be called with the "
"result of every JSON object decoded with an ordered list of pairs. The "
"return value of *object_pairs_hook* will be used instead of the :class:"
"`dict`. This feature can be used to implement custom decoders. If "
"*object_hook* is also defined, the *object_pairs_hook* takes priority."
msgstr ""
#: ../../library/json.rst:425
msgid "Added support for *object_pairs_hook*."
msgstr "*object_pairs_hook* のサポートが追加されました。"
#: ../../library/json.rst:428
msgid ""
"*array_hook* is an optional function that will be called with the result of "
"every JSON array decoded as a list. The return value of *array_hook* will be "
"used instead of the :class:`list`. This feature can be used to implement "
"custom decoders."
msgstr ""
#: ../../library/json.rst:433
msgid "Added support for *array_hook*."
msgstr ""
#: ../../library/json.rst:436
msgid ""
"*parse_float* is an optional function that will be called with the string of "
"every JSON float to be decoded. By default, this is equivalent to "
"``float(num_str)``. This can be used to use another datatype or parser for "
"JSON floats (e.g. :class:`decimal.Decimal`)."
msgstr ""
#: ../../library/json.rst:441
msgid ""
"*parse_int* is an optional function that will be called with the string of "
"every JSON int to be decoded. By default, this is equivalent to "
"``int(num_str)``. This can be used to use another datatype or parser for "
"JSON integers (e.g. :class:`float`)."
msgstr ""
#: ../../library/json.rst:446
msgid ""
"*parse_constant* is an optional function that will be called with one of the "
"following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be "
"used to raise an exception if invalid JSON numbers are encountered."
msgstr ""
#: ../../library/json.rst:450
msgid ""
"If *strict* is false (``True`` is the default), then control characters will "
"be allowed inside strings. Control characters in this context are those "
"with character codes in the 0--31 range, including ``'\\t'`` (tab), "
"``'\\n'``, ``'\\r'`` and ``'\\0'``."
msgstr ""
"*strict* が false (デフォルトは ``True``) の場合、制御文字を文字列に含めるこ"
"とができます。ここで言う制御文字とは、``'\\t'`` (タブ)、``'\\n'``、"
"``'\\r'``、``'\\0'`` を含む 0-31 の範囲のコードを持つ文字のことです。"
#: ../../library/json.rst:455
msgid ""
"If the data being deserialized is not a valid JSON document, a :exc:"
"`JSONDecodeError` will be raised."
msgstr ""
"脱直列化しようとしているデータが不正な JSON ドキュメントだった場合、 :exc:"
"`JSONDecodeError` が送出されます。"
#: ../../library/json.rst:458 ../../library/json.rst:564
msgid "All parameters are now :ref:`keyword-only <keyword-only_parameter>`."
msgstr ""
"すべての引数は、 :ref:`キーワード専用 <keyword-only_parameter>` になりまし"
"た。 "
#: ../../library/json.rst:463
msgid ""
"Return the Python representation of *s* (a :class:`str` instance containing "
"a JSON document)."
msgstr ""
"*s* (:class:`str` インスタンスで JSON 文書を含むもの) の Python 表現を返しま"
"す。"
#: ../../library/json.rst:466
msgid ""
":exc:`JSONDecodeError` will be raised if the given JSON document is not "
"valid."
msgstr ""
"不正な JSON ドキュメントが与えられた場合、 :exc:`JSONDecodeError` が送出され"
"ます。"
#: ../../library/json.rst:471
msgid ""
"Decode a JSON document from *s* (a :class:`str` beginning with a JSON "
"document) and return a 2-tuple of the Python representation and the index in "
"*s* where the document ended."
msgstr ""
"*s* (:class:`str` インスタンスで JSON 文書で始まるもの) から JSON 文書をデ"
"コードし、Python 表現と *s* の文書の終わるところのインデックスからなる 2 要素"
"のタプルを返します。"
#: ../../library/json.rst:475
msgid ""
"This can be used to decode a JSON document from a string that may have "
"extraneous data at the end."
msgstr ""
"このメソッドは後ろに余分なデータを従えた文字列から JSON 文書をデコードするの"
"に使えます。"
#: ../../library/json.rst:481
msgid "Extensible JSON encoder for Python data structures."
msgstr "Python データ構造に対する拡張可能な JSON エンコーダ。"
#: ../../library/json.rst:483
msgid "Supports the following objects and types by default:"
msgstr "デフォルトでは以下のオブジェクトと型をサポートします:"
#: ../../library/json.rst:490
msgid "dict, frozendict"
msgstr ""
#: ../../library/json.rst:492
msgid "list, tuple"
msgstr "list, tuple"
#: ../../library/json.rst:496
msgid "int, float, int- & float-derived Enums"
msgstr "int、float と int や float の派生列挙型"
#: ../../library/json.rst:496
msgid "number"
msgstr "number"
#: ../../library/json.rst:505
msgid "Added support for int- and float-derived Enum classes."
msgstr "int と float の派生列挙型クラスの対応が追加されました。"
#: ../../library/json.rst:508
msgid "Added support for :class:`frozendict`."
msgstr ""
#: ../../library/json.rst:511
msgid ""
"To extend this to recognize other objects, subclass and implement a :meth:"
"`~JSONEncoder.default` method with another method that returns a "
"serializable object for ``o`` if possible, otherwise it should call the "
"superclass implementation (to raise :exc:`TypeError`)."
msgstr ""
"このクラスを拡張して他のオブジェクトも認識するようにするには、サブクラスを"
"作って :meth:`~JSONEncoder.default` メソッドを次のように実装します。もう一つ"
"別のメソッドでオブジェクト ``o`` に対する直列化可能なオブジェクトを返すものを"
"呼び出すようにします。変換できない時はスーパークラスの実装を (:exc:"
"`TypeError` を送出させるために) 呼ばなければなりません。"
#: ../../library/json.rst:516
msgid ""
"If *skipkeys* is false (the default), a :exc:`TypeError` will be raised when "
"trying to encode keys that are not :class:`str`, :class:`int`, :class:"
"`float`, :class:`bool` or ``None``. If *skipkeys* is true, such items are "
"simply skipped."
msgstr ""
#: ../../library/json.rst:520
msgid ""
"If *ensure_ascii* is true (the default), the output is guaranteed to have "
"all incoming non-ASCII and non-printable characters escaped. If "
"*ensure_ascii* is false, all characters will be output as-is, except for the "
"characters that must be escaped: quotation mark, reverse solidus, and the "
"control characters U+0000 through U+001F."
msgstr ""
#: ../../library/json.rst:526
msgid ""
"If *check_circular* is true (the default), then lists, dicts, and custom "
"encoded objects will be checked for circular references during encoding to "
"prevent an infinite recursion (which would cause a :exc:`RecursionError`). "
"Otherwise, no such check takes place."
msgstr ""
"*check_circular* が true (デフォルト) ならば、リスト、辞書および自作でエン"
"コードしたオブジェクトは循環参照がないかエンコード中にチェックされ、無限再帰 "
"(これは :exc:`RecursionError` を引き起こします) を防止します。 ``True`` でな"
"い場合は、そういったチェックは施されません。"
#: ../../library/json.rst:531
msgid ""
"If *allow_nan* is true (the default), then ``NaN``, ``Infinity``, and ``-"
"Infinity`` will be encoded as such. This behavior is not JSON specification "
"compliant, but is consistent with most JavaScript based encoders and "
"decoders. Otherwise, it will be a :exc:`ValueError` to encode such floats."
msgstr ""
"*allow_nan* が true (デフォルト) ならば、 ``NaN``, ``Infinity``, ``-"
"Infinity`` はそのままエンコードされます。この振る舞いは JSON 仕様に従っていま"
"せんが、大半の JavaScript ベースのエンコーダ、デコーダと矛盾しません。 "
"``True`` でない場合は、そのような浮動小数点数をエンコードすると :exc:"
"`ValueError` が送出されます。"
#: ../../library/json.rst:537
msgid ""
"If *sort_keys* is true (default: ``False``), then the output of dictionaries "
"will be sorted by key; this is useful for regression tests to ensure that "
"JSON serializations can be compared on a day-to-day basis."
msgstr ""
"*sort_keys* が true (デフォルトは ``False``) ならば、辞書の出力がキーでソート"
"されます。これは JSON の直列化がいつでも比較できるようになるので回帰試験の際"
"に便利です。"
#: ../../library/json.rst:541
msgid ""
"If *indent* is a non-negative integer or string, then JSON array elements "
"and object members will be pretty-printed with that indent level. An indent "
"level of 0, negative, or ``\"\"`` will only insert newlines. ``None`` (the "
"default) selects the most compact representation. Using a positive integer "
"indent indents that many spaces per level. If *indent* is a string (such as "
"``\"\\t\"``), that string is used to indent each level."
msgstr ""
"*indent* が非負の整数または文字列であれば、JSON の配列要素とオブジェクトメン"
"バはそのインデントレベルで見やすく表示されます。インデントレベルが 0 か負数ま"
"たは ``\"\"`` であれば 改行だけが挿入されます。``None`` (デフォルト) では最も"
"コンパクトな表現が選択されます。正の数のindentはレベル毎に、指定した数のス"
"ペースでインデントします。もし *indent* が文字列 (``\"\\t\"`` のような) であ"
"れば、その文字列が個々のレベルのインデントに使用されます。"
#: ../../library/json.rst:551
msgid ""
"If specified, *separators* should be an ``(item_separator, key_separator)`` "
"tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and ``(',', "
"': ')`` otherwise. To get the most compact JSON representation, you should "
"specify ``(',', ':')`` to eliminate whitespace."
msgstr ""
"*separators* はもし指定するなら ``(item_separator, key_separator)`` というタ"
"プルでなければなりません。デフォルトは *indent* が ``None`` のとき ``(', ', "
"': ')`` で、そうでなければ ``(',', ': ')`` です。最もコンパクトな JSON の表現"
"を得たければ空白を削った ``(',', ':')`` を指定すればいいでしょう。"
#: ../../library/json.rst:559
msgid ""
"If specified, *default* should be a function that gets called for objects "
"that can't otherwise be serialized. It should return a JSON encodable "
"version of the object or raise a :exc:`TypeError`. If not specified, :exc:"
"`TypeError` is raised."
msgstr ""
"*default* を指定する場合は関数を指定して、この関数はそれ以外では直列化できな"
"いオブジェクトに対して呼び出されます。\n"
"その関数は、オブジェクトを JSON でエンコードできるバージョンにして返すか、さ"
"もなければ :exc:`TypeError` を送出しなければなりません。\n"
"指定しない場合は、 :exc:`TypeError` が送出されます。"
#: ../../library/json.rst:570
msgid ""
"Implement this method in a subclass such that it returns a serializable "
"object for *o*, or calls the base implementation (to raise a :exc:"
"`TypeError`)."
msgstr ""
"このメソッドをサブクラスで実装する際には *o* に対して直列化可能なオブジェクト"
"を返すか、基底クラスの実装を (:exc:`TypeError` を送出するために) 呼び出すかし"
"ます。"
#: ../../library/json.rst:574
msgid ""
"For example, to support arbitrary iterators, you could implement :meth:"
"`~JSONEncoder.default` like this::"
msgstr ""
"例えば、任意のイテレータをサポートする場合、 :meth:`~JSONEncoder.default` を"
"このように実装できます ::"
#: ../../library/json.rst:577
msgid ""
"def default(self, o):\n"
" try:\n"
" iterable = iter(o)\n"
" except TypeError:\n"
" pass\n"
" else:\n"
" return list(iterable)\n"
" # Let the base class default method raise the TypeError\n"
" return super().default(o)"
msgstr ""
#: ../../library/json.rst:590
msgid ""
"Return a JSON string representation of a Python data structure, *o*. For "
"example::"
msgstr "Python データ構造 *o* の JSON 文字列表現を返します。たとえば::"
#: ../../library/json.rst:593
msgid ""
">>> json.JSONEncoder().encode({\"foo\": [\"bar\", \"baz\"]})\n"
"'{\"foo\": [\"bar\", \"baz\"]}'"
msgstr ""
#: ../../library/json.rst:599
msgid ""
"Encode the given object, *o*, and yield each string representation as "
"available. For example::"
msgstr ""
"与えられたオブジェクト *o* をエンコードし、得られた文字列表現ごとに yield し"
"ます。たとえば::"
#: ../../library/json.rst:602
msgid ""
"for chunk in json.JSONEncoder().iterencode(bigobject):\n"
" mysocket.write(chunk)"
msgstr ""
#: ../../library/json.rst:607
msgid "Exceptions"
msgstr "例外"
#: ../../library/json.rst:611
msgid "Subclass of :exc:`ValueError` with the following additional attributes:"
msgstr ":exc:`ValueError` のサブクラスで、以下の追加の属性を持ちます:"
#: ../../library/json.rst:615
msgid "The unformatted error message."
msgstr "フォーマットされていないエラーメッセージです。"
#: ../../library/json.rst:619
msgid "The JSON document being parsed."
msgstr "パース対象 JSON ドキュメントです。"
#: ../../library/json.rst:623
msgid "The start index of *doc* where parsing failed."
msgstr "*doc* の、解析に失敗した開始インデクスです。"
#: ../../library/json.rst:627
msgid "The line corresponding to *pos*."
msgstr "*pos* に対応する行です。"
#: ../../library/json.rst:631