svn: /phpdoc/zh/trunk/reference/json/functions/ json-encode.xml json-last-error.xml
| From: | Dai Jie | Date: | Thu, 19 Jan 2017 16:08:50 +0000 |
| Subject: | svn: /phpdoc/zh/trunk/reference/json/functions/ json-encode.xml json-last-error.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-4769@lists.php.net to get a copy of this message | ||
daijie Thu, 19 Jan 2017 16:08:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=341704
Log:
Sync with EN.
Changed paths:
U phpdoc/zh/trunk/reference/json/functions/json-encode.xml
U phpdoc/zh/trunk/reference/json/functions/json-last-error.xml
Modified: phpdoc/zh/trunk/reference/json/functions/json-encode.xml
===================================================================
--- phpdoc/zh/trunk/reference/json/functions/json-encode.xml 2017-01-19 16:08:05 UTC (rev 341703)
+++ phpdoc/zh/trunk/reference/json/functions/json-encode.xml 2017-01-19 16:08:50 UTC (rev 341704)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- $Author$ -->
-<!-- EN-Revision: 337479 Maintainer: daijie Status: ready -->
+<!-- EN-Revision: 339594 Maintainer: daijie Status: ready -->
<refentry xml:id="function.json-encode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>json_encode</refname>
@@ -30,10 +29,10 @@
<listitem>
<para>
待编码的 <parameter>value</parameter>
,除了<type>resource</type>
- 类型之外,可以为任何数据类型
+ 类型之外,可以为任何数据类型。
</para>
<para>
- 该函数只能接受 UTF-8 编码的数据
+ 所有字符串数据的编码必须是 UTF-8。
</para>
&json.implementation.superset;
</listitem>
@@ -90,6 +89,12 @@
</thead>
<tbody>
<row>
+ <entry>7.1.0</entry>
+ <entry>
+ 对 Double 的值进行编码时,使用 <link
linkend="ini.serialize-precision">serialize_precision</link> 代替 <link
linkend="ini.precision">precision</link>。
+ </entry>
+ </row>
+ <row>
<entry>5.6.6</entry>
<entry>
<parameter>options</parameter> 参数增加常量:
@@ -222,7 +227,7 @@
?>
]]>
</programlisting>
- &example.outputs;
+ &example.outputs.similar;
<screen>
<![CDATA[
Strings representing numbers automatically turned into numbers
@@ -364,8 +369,7 @@
point.
</para>
<para>
- To summarise, always test that your JSON decoder can handle the output you
- generate from <function>json_encode</function>.
+ 总而言之,应该测试下 JSON decoder 能否处理
<function>json_encode</function> 生成的数据。
</para>
</note>
</refsect1>
Modified: phpdoc/zh/trunk/reference/json/functions/json-last-error.xml
===================================================================
--- phpdoc/zh/trunk/reference/json/functions/json-last-error.xml 2017-01-19 16:08:05 UTC (rev
341703)
+++ phpdoc/zh/trunk/reference/json/functions/json-last-error.xml 2017-01-19 16:08:50 UTC (rev
341704)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 331633 Maintainer: daijie Status: ready -->
+<!-- EN-Revision: 341024 Maintainer: daijie Status: ready -->
<refentry xml:id="function.json-last-error" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -87,9 +87,19 @@
</row>
<row>
<entry><constant>JSON_ERROR_UNSUPPORTED_TYPE</constant></entry>
- <entry>A value of a type that cannot be encoded was given</entry>
+ <entry>指定的类型,值无法编码。</entry>
<entry>PHP 5.5.0</entry>
</row>
+ <row>
+ <entry><constant>JSON_ERROR_INVALID_PROPERTY_NAME</constant></entry>
+ <entry>指定的属性名无法编码。</entry>
+ <entry>PHP 7.0.0</entry>
+ </row>
+ <row>
+ <entry><constant>JSON_ERROR_UTF16</constant></entry>
+ <entry>畸形的 UTF-16 字符,可能因为字符编码不正确。</entry>
+ <entry>PHP 7.0.0</entry>
+ </row>
</tbody>
</tgroup>
</table>