@@ -499,13 +499,17 @@ msgid ""
499499"deserializing, the string representing the object may have been stored in a "
500500"file or data, or sent over a network connection to some distant machine."
501501msgstr ""
502+ "Python 允许你使用称为 `JSON (JavaScript Object Notation) <http://json.org>`_ "
503+ "的流行数据交换格式,而不是让用户不断的编写和调试代码以将复杂的数据类型保存到文件中。名为 :mod:`json` 的标准模块可以采用Python "
504+ "数据层次结构,并将它们转化为字符串表示形式;这个过程称为 :dfn:`serializing` 。从字符串表示中重建数据称为 "
505+ ":dfn:`deserializing` 。在序列化和反序列化之间,表示对象的字符串可能已存储在文件或数据中,或通过网络连接发送到某个远程机器。"
502506
503507#: ../../tutorial/inputoutput.rst:468
504508msgid ""
505509"The JSON format is commonly used by modern applications to allow for data "
506510"exchange. Many programmers are already familiar with it, which makes it a "
507511"good choice for interoperability."
508- msgstr ""
512+ msgstr "JSON格式通常被现代应用程序用于允许数据交换。许多程序员已经熟悉它,这使其成为互操作性的良好选择。 "
509513
510514#: ../../tutorial/inputoutput.rst:472
511515msgid ""
@@ -519,12 +523,14 @@ msgid ""
519523":func:`~json.dump`, simply serializes the object to a :term:`text file`. So"
520524" if ``f`` is a :term:`text file` object opened for writing, we can do this::"
521525msgstr ""
526+ ":func:`~json.dumps` 函数的另一个变体叫做 :func:`~json.dump` ,它只是将对象序列化为 :term:`text "
527+ "file` 。因此,如果 ``f`` 是一个 :term:`text file` 对象,我们可以这样做::"
522528
523529#: ../../tutorial/inputoutput.rst:485
524530msgid ""
525531"To decode the object again, if ``f`` is a :term:`text file` object which has"
526532" been opened for reading::"
527- msgstr ""
533+ msgstr "要再次解码对象,如果 ``f`` 是一个打开的以供阅读的 :term:`text file` 对象:: "
528534
529535#: ../../tutorial/inputoutput.rst:490
530536msgid ""
@@ -533,10 +539,11 @@ msgid ""
533539"effort. The reference for the :mod:`json` module contains an explanation of "
534540"this."
535541msgstr ""
542+ "这种简单的序列化技术可以处理列表和字典,但是在JSON中序列化任意类的实例需要额外的努力。 :mod:`json` 模块的参考包含对此的解释。"
536543
537544#: ../../tutorial/inputoutput.rst:496
538545msgid ":mod:`pickle` - the pickle module"
539- msgstr ""
546+ msgstr "封存封存:mod:`pickle` - pickle模块 "
540547
541548#: ../../tutorial/inputoutput.rst:498
542549msgid ""
@@ -547,3 +554,6 @@ msgid ""
547554"pickle data coming from an untrusted source can execute arbitrary code, if "
548555"the data was crafted by a skilled attacker."
549556msgstr ""
557+ "与 :ref:`JSON <tut-json>` 相反的是,*pickle* 是一种允许对任意复杂Python "
558+ "对象进行序列化的协议。因此,它特定于Python,不能用于与其他语言编写的应用程序通信。默认情况下它也是不安全的:如果数据是由熟练的攻击者精心设计的,则反序列化来自不受信任来源的"
559+ " pickle 数据可以执行任意代码。"
0 commit comments