# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # python-doc bot, 2025 # Takanori Suzuki , 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 , 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) `_, specified by :rfc:" "`7159` (which obsoletes :rfc:`4627`) and by `ECMA-404 `_, is a " "lightweight data interchange format inspired by `JavaScript `_ object literal syntax (although it is not a " "strict subset of JavaScript [#rfc-errata]_ )." msgstr "" "`JSON (JavaScript Object Notation) `_ は、 :rfc:`7159` (:" "rfc:`4627` を obsolete) と `ECMA-404 `_ によって定義された軽量の" "データ交換用のフォーマットです。 JavaScript のオブジェクトリテラル記法に由来" "しています (`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 `_ 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 `_ 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 `." msgstr "" "この :ref:`PythonからJSONへの変換表 ` を使って、 *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 `." msgstr "" "すべてのオプション引数は、 :ref:`キーワード専用 ` に" "なりました。 " #: ../../library/json.rst:262 msgid "" "Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion " "table `. The arguments have the same meaning as in :func:" "`dump`." msgstr "" "この :ref:`変換表 ` を使って、*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 `." 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 `_ 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 ` to help avoid denial of service attacks." msgstr "" "デフォルトの *parse_int* である :func:`int` は、インタープリタの :ref:" "`integer string conversion length limitation ` により整数" "文字列の最大長を制限するようになり、サービスを妨害する攻撃を拒否します。" #: ../../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 `." 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 `_ 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 `." msgstr "" "すべての引数は、 :ref:`キーワード専用 ` になりまし" "た。 " #: ../../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 msgid "The column corresponding to *pos*." msgstr "*pos* に対応する列です。" #: ../../library/json.rst:637 msgid "Standard Compliance and Interoperability" msgstr "標準への準拠と互換性" #: ../../library/json.rst:639 msgid "" "The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. This " "section details this module's level of compliance with the RFC. For " "simplicity, :class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and " "parameters other than those explicitly mentioned, are not considered." msgstr "" #: ../../library/json.rst:645 msgid "" "This module does not comply with the RFC in a strict fashion, implementing " "some extensions that are valid JavaScript but not valid JSON. In particular:" msgstr "" "このモジュールは、JavaScript では正しいが JSON では不正ないくつかの拡張が実装" "されているため、厳密な意味では RFC に準拠していません。特に:" #: ../../library/json.rst:648 msgid "Infinite and NaN number values are accepted and output;" msgstr "無限および NaN の数値を受け付け、また出力します;" #: ../../library/json.rst:649 msgid "" "Repeated names within an object are accepted, and only the value of the last " "name-value pair is used." msgstr "" "あるオブジェクト内での同じ名前の繰り返しを受け付け、最後の名前と値のペアの値" "のみを使用します。" #: ../../library/json.rst:652 msgid "" "Since the RFC permits RFC-compliant parsers to accept input texts that are " "not RFC-compliant, this module's deserializer is technically RFC-compliant " "under default settings." msgstr "" "この RFC は、RFC 準拠のパーサが RFC 準拠でない入力テキストを受け付けることを" "許容しているので、このモジュールの脱直列化は技術的に言えば、デフォルトの設定" "では RFC に準拠しています。" #: ../../library/json.rst:657 msgid "Character Encodings" msgstr "文字エンコーディング" #: ../../library/json.rst:659 msgid "" "The RFC requires that JSON be represented using either UTF-8, UTF-16, or " "UTF-32, with UTF-8 being the recommended default for maximum " "interoperability." msgstr "" "RFC は、UTF-8、UTF-16、UTF-32のいずれかでJSONを表現するように要求しており、" "UTF-8 が最大の互換性を確保するために推奨されるデフォルトです。" #: ../../library/json.rst:662 msgid "" "As permitted, though not required, by the RFC, this module's serializer sets " "*ensure_ascii=True* by default, thus escaping the output so that the " "resulting strings only contain printable ASCII characters." msgstr "" #: ../../library/json.rst:666 msgid "" "Other than the *ensure_ascii* parameter, this module is defined strictly in " "terms of conversion between Python objects and :class:`Unicode strings " "`, and thus does not otherwise directly address the issue of character " "encodings." msgstr "" "*ensure_ascii* パラメータ以外は、このモジュールは Python オブジェクトと :" "class:`Unicode 文字列 ` の間の変換において厳密に定義されていて、それ以外" "のパラメータで文字エンコーディングに直接的に関わるものはありません。" #: ../../library/json.rst:671 msgid "" "The RFC prohibits adding a byte order mark (BOM) to the start of a JSON " "text, and this module's serializer does not add a BOM to its output. The RFC " "permits, but does not require, JSON deserializers to ignore an initial BOM " "in their input. This module's deserializer raises a :exc:`ValueError` when " "an initial BOM is present." msgstr "" "RFC は JSON テキストの最初にバイトオーダマーク(BOM)を追加することを禁止してい" "ますので、このモジュールはその出力に BOM を追加しません。RFC は JSON デシリア" "ライザが入力の一番最初の BOM を無視することを、許容はしますが求めてはいませ" "ん。このモジュールのデシリアライザは一番最初の BOM を見つけると :exc:" "`ValueError` を送出します。" #: ../../library/json.rst:677 msgid "" "The RFC does not explicitly forbid JSON strings which contain byte sequences " "that don't correspond to valid Unicode characters (e.g. unpaired UTF-16 " "surrogates), but it does note that they may cause interoperability problems. " "By default, this module accepts and outputs (when present in the original :" "class:`str`) code points for such sequences." msgstr "" "RFC は JSON 文字列に正当な Unicode 文字に対応付かないバイト列(例えばペアにな" "らない UTF-16 サロゲートのかたわれ)が含まれることを明示的に禁止してはおらず、" "もちろんこれは相互運用性の問題を引き起こします。デフォルトでは、このモジュー" "ルは(オリジナルの :class:`str` にある場合)そのようなシーケンスのコードポイン" "トを受け取り、出力します。" #: ../../library/json.rst:685 msgid "Infinite and NaN Number Values" msgstr "無限および NaN の数値" #: ../../library/json.rst:687 msgid "" "The RFC does not permit the representation of infinite or NaN number values. " "Despite that, by default, this module accepts and outputs ``Infinity``, ``-" "Infinity``, and ``NaN`` as if they were valid JSON number literal values::" msgstr "" "RFC は、無限もしくは NaN の数値の表現は許可していません。それにも関わらずデ" "フォルトでは、このモジュールは ``Infinity``、``-Infinity``、``NaN`` を正しい " "JSON の数値リテラルの値であるかのように受け付け、出力します::" #: ../../library/json.rst:691 msgid "" ">>> # Neither of these calls raises an exception, but the results are not " "valid JSON\n" ">>> json.dumps(float('-inf'))\n" "'-Infinity'\n" ">>> json.dumps(float('nan'))\n" "'NaN'\n" ">>> # Same when deserializing\n" ">>> json.loads('-Infinity')\n" "-inf\n" ">>> json.loads('NaN')\n" "nan" msgstr "" #: ../../library/json.rst:702 msgid "" "In the serializer, the *allow_nan* parameter can be used to alter this " "behavior. In the deserializer, the *parse_constant* parameter can be used " "to alter this behavior." msgstr "" "シリアライザでは、この振る舞いを変更するのに *allow_nan* パラメータが使えま" "す。デシリアライザでは、この振る舞いを変更するのに *parse_constant* パラメー" "タが使えます。" #: ../../library/json.rst:708 msgid "Repeated Names Within an Object" msgstr "オブジェクト中に重複した名前の扱い" #: ../../library/json.rst:710 msgid "" "The RFC specifies that the names within a JSON object should be unique, but " "does not mandate how repeated names in JSON objects should be handled. By " "default, this module does not raise an exception; instead, it ignores all " "but the last name-value pair for a given name::" msgstr "" "RFC は JSON オブジェクト中の名前はユニークでなければならないと規定しています" "が、JSONオブジェクトで名前が繰り返された場合の扱いについて指定していません。" "デフォルトでは、このモジュールは例外を送出せず、かわりに重複した名前のうち、" "最後に出現した名前と値のペア以外を無視します。" #: ../../library/json.rst:715 msgid "" ">>> weird_json = '{\"x\": 1, \"x\": 2, \"x\": 3}'\n" ">>> json.loads(weird_json)\n" "{'x': 3}" msgstr "" #: ../../library/json.rst:719 msgid "The *object_pairs_hook* parameter can be used to alter this behavior." msgstr "*object_pairs_hook* パラメータでこの動作を変更できます。" #: ../../library/json.rst:723 msgid "Top-level Non-Object, Non-Array Values" msgstr "トップレベルの非オブジェクト、非配列の値の扱い" #: ../../library/json.rst:725 msgid "" "The old version of JSON specified by the obsolete :rfc:`4627` required that " "the top-level value of a JSON text must be either a JSON object or array " "(Python :class:`dict` or :class:`list`), and could not be a JSON null, " "boolean, number, or string value. :rfc:`7159` removed that restriction, and " "this module does not and has never implemented that restriction in either " "its serializer or its deserializer." msgstr "" "廃止された :rfc:`4627` によって規定された古いバージョンの JSON では、JSON テ" "キストのトップレベルの値は JSON オブジェクトか配列(Python での :class:`dict` " "か :class:`list`)であることを要求していて、JSON の null, boolean, number, " "string であることは許されていませんでしたが、この制限は :rfc:`7159` により取" "り払われました。このモジュールはこの制限を持っていませんし、シリアライザでも" "デシリアライズでも、一度としてこの制限で実装されたことはありません。" #: ../../library/json.rst:732 msgid "" "Regardless, for maximum interoperability, you may wish to voluntarily adhere " "to the restriction yourself." msgstr "" "それにも関わらず、相互運用可能性を最大化したいならば、あなた自身の手で自発的" "にその制約に忠実に従いたいと思うでしょう。" #: ../../library/json.rst:737 msgid "Implementation Limitations" msgstr "実装の制限" #: ../../library/json.rst:739 msgid "Some JSON deserializer implementations may set limits on:" msgstr "" "いくつかの JSON デシリアライザの実装は、以下の制限を設定することがあります。" #: ../../library/json.rst:741 msgid "the size of accepted JSON texts" msgstr "受け入れられる JSON テキストのサイズ" #: ../../library/json.rst:742 msgid "the maximum level of nesting of JSON objects and arrays" msgstr "JSON オブジェクトと配列のネストの最大の深さ" #: ../../library/json.rst:743 msgid "the range and precision of JSON numbers" msgstr "JSON 数値の範囲と精度" #: ../../library/json.rst:744 msgid "the content and maximum length of JSON strings" msgstr "JSON 文字列の内容と最大の長さ" #: ../../library/json.rst:746 msgid "" "This module does not impose any such limits beyond those of the relevant " "Python datatypes themselves or the Python interpreter itself." msgstr "" "このモジュールは関連する Python データ型や Python インタプリタ自身の制約の世" "界を超えたそのような制約を強要はしません。" #: ../../library/json.rst:749 msgid "" "When serializing to JSON, beware any such limitations in applications that " "may consume your JSON. In particular, it is common for JSON numbers to be " "deserialized into IEEE 754 double precision numbers and thus subject to that " "representation's range and precision limitations. This is especially " "relevant when serializing Python :class:`int` values of extremely large " "magnitude, or when serializing instances of \"exotic\" numerical types such " "as :class:`decimal.Decimal`." msgstr "" "JSON にシリアライズする際には、あなたの JSON を消費する側のアプリケーションが" "持つ当該制約に思いを馳せてください。とりわけJSON 数値を IEEE 754 倍精度浮動小" "数にデシリアライズする際の問題はありがちで、すなわちその有効桁数と精度の制限" "の影響を受けます。これは、極端に大きな値を持った Python :class:`int` をシリア" "ライズするとき、あるいは :class:`decimal.Decimal` のような \"風変わりな\" 数" "値型をシリアライズするとき、に特に関係があります。" #: ../../library/json.rst:762 msgid "Command-line interface" msgstr "コマンドライン・インターフェース" #: ../../library/json.rst:767 msgid "**Source code:** :source:`Lib/json/tool.py`" msgstr "**ソースコード:** :source:`Lib/json/tool.py`" #: ../../library/json.rst:771 msgid "" "The :mod:`!json` module can be invoked as a script via ``python -m json`` to " "validate and pretty-print JSON objects. The :mod:`!json.tool` submodule " "implements this interface." msgstr "" #: ../../library/json.rst:775 msgid "" "If the optional ``infile`` and ``outfile`` arguments are not specified, :" "data:`sys.stdin` and :data:`sys.stdout` will be used respectively:" msgstr "" "オプション引数の ``infile`` と ``outfile`` が指定されない場合、それぞれ :" "data:`sys.stdin` と :data:`sys.stdout` が使用されます。" #: ../../library/json.rst:778 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 "" #: ../../library/json.rst:787 msgid "" "The output is now in the same order as the input. Use the :option:`--sort-" "keys` option to sort the output of dictionaries alphabetically by key." msgstr "" "出力が、入力と同じ順序になりました。辞書をキーでアルファベット順に並べ替えた" "出力が欲しければ、 :option:`--sort-keys` オプションを使ってください。" #: ../../library/json.rst:792 msgid "" "The :mod:`!json` module may now be directly executed as ``python -m json``. " "For backwards compatibility, invoking the CLI as ``python -m json.tool`` " "remains supported." msgstr "" #: ../../library/json.rst:799 msgid "Command-line options" msgstr "コマンドラインオプション" #: ../../library/json.rst:803 msgid "The JSON file to be validated or pretty-printed:" msgstr "検証を行う、あるいは整形出力を行う JSON ファイルを指定します:" #: ../../library/json.rst:805 msgid "" "$ python -m json mp_films.json\n" "[\n" " {\n" " \"title\": \"And Now for Something Completely Different\",\n" " \"year\": 1971\n" " },\n" " {\n" " \"title\": \"Monty Python and the Holy Grail\",\n" " \"year\": 1975\n" " }\n" "]" msgstr "" #: ../../library/json.rst:819 msgid "If *infile* is not specified, read from :data:`sys.stdin`." msgstr "*infile* が指定されない場合、 :data:`sys.stdin` から読み込みます。" #: ../../library/json.rst:823 msgid "" "Write the output of the *infile* to the given *outfile*. Otherwise, write it " "to :data:`sys.stdout`." msgstr "" "*infile* の出力を *outfile* に書き込みます。そうでない場合、 :data:`sys." "stdout` に書き込みます。" #: ../../library/json.rst:828 msgid "Sort the output of dictionaries alphabetically by key." msgstr "辞書の出力を、キーのアルファベット順にソートします。" #: ../../library/json.rst:834 msgid "" "Disable escaping of non-ascii characters, see :func:`json.dumps` for more " "information." msgstr "" "非 ASCII 文字のエスケープを無効化します。より詳しくは :func:`json.dumps` を参" "照してください。" #: ../../library/json.rst:840 msgid "Parse every input line as separate JSON object." msgstr "すべての入力行を個別のJSON オブジェクトとしてパースします。" #: ../../library/json.rst:846 msgid "Mutually exclusive options for whitespace control." msgstr "空白文字の制御のための排他的なオプション。" #: ../../library/json.rst:852 msgid "Show the help message." msgstr "ヘルプメッセージを出力します" #: ../../library/json.rst:856 msgid "Footnotes" msgstr "脚注" #: ../../library/json.rst:857 msgid "" "As noted in `the errata for RFC 7159 `_, JSON permits literal U+2028 (LINE SEPARATOR) " "and U+2029 (PARAGRAPH SEPARATOR) characters in strings, whereas JavaScript " "(as of ECMAScript Edition 5.1) does not." msgstr "" "`RFC 7159 正誤表 `_ で" "述べられている通り、JSON は (ECMAScript Edition 5.1 の) JavaScript とは逆" "に、 U+2028 (LINE SEPARATOR) と U+2029 (PARAGRAPH SEPARATOR) が文字列内に含ま" "れることを許容しています。"