svn: /phpdoc/ja/trunk/ appendices/migration55.xml reference/json/functions/json-encode.xml

From: Date: Sat, 09 May 2020 01:05:11 +0000
Subject: svn: /phpdoc/ja/trunk/ appendices/migration55.xml reference/json/functions/json-encode.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-5629@lists.php.net to get a copy of this message
mumumu Sat, 09 May 2020 01:05:11 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=349760 Log: Document changes to json_encode in php 5.5 Returning false when there was any encoding error is an improvement, but would be backwards incompatible if applications depended on the implicit JSON_PARTIAL_OUTPUT_ON_ERROR behavior of PHP 5.4 and earlier. Changed paths: U phpdoc/ja/trunk/appendices/migration55.xml U phpdoc/ja/trunk/reference/json/functions/json-encode.xml Modified: phpdoc/ja/trunk/appendices/migration55.xml =================================================================== --- phpdoc/ja/trunk/appendices/migration55.xml 2020-05-09 00:51:51 UTC (rev 349759) +++ phpdoc/ja/trunk/appendices/migration55.xml 2020-05-09 01:05:11 UTC (rev 349760) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 349711 Maintainer: takagi Status: ready --> +<!-- EN-Revision: 349754 Maintainer: takagi Status: ready --> <!-- Credits: mumumu --> <appendix xml:id="migration55" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -154,6 +154,18 @@ </programlisting> </informalexample> </sect2> + <sect2 xml:id="migration55.incompatible.json"> + <title><function>json_encode</function> 関数に対する変更</title> + <para> + <function>json_encode</function> に渡した <parameter>value</parameter> 引数が JSON + エンコーディングとしてエラーだった場合、 一部を出力する代わりに &false; を返すようになりました。 + <parameter>options</parameter> に <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> + が含まれていた場合は、これまで通り一部を出力します。 + JSON エンコーディングが失敗した理由の一覧をすべて見るには、 + <function>json_last_error</function> を参照してください。 + 可能性がある理由の一つは、<parameter>value</parameter> に不正や UTF-8 文字列が含まれていることです。 + </para> + </sect2> <sect2 xml:id="migration55.incompatible.self-parent-static"> <title><literal>self</literal> や <literal>parent</literal> そして <literal>static</literal> @@ -1640,6 +1652,11 @@ <link linkend="constant.json-error-unsupported-type"><constant>JSON_ERROR_UNSUPPORTED_TYPE</constant></link> </simpara> </listitem> + <listitem> + <simpara> + <link linkend="constant.json-partial-output-on-error"><constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant></link> + </simpara> + </listitem> </itemizedlist> </sect2> Modified: phpdoc/ja/trunk/reference/json/functions/json-encode.xml =================================================================== --- phpdoc/ja/trunk/reference/json/functions/json-encode.xml 2020-05-09 00:51:51 UTC (rev 349759) +++ phpdoc/ja/trunk/reference/json/functions/json-encode.xml 2020-05-09 01:05:11 UTC (rev 349760) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 347351 Maintainer: takagi Status: ready --> +<!-- EN-Revision: 349754 Maintainer: takagi Status: ready --> <!-- Credits: mumumu --> <refentry xml:id="function.json-encode" xmlns="http://docbook.org/ns/docbook"> <refnamediv> @@ -161,6 +161,24 @@ </entry> </row> <row> + <entry>5.5.0</entry> + <entry> + <parameter>value</parameter> 引数が JSON + エンコーディングとしてエラーだった場合、 一部を出力する代わりに &false; を返すようになりました。 + <parameter>options</parameter> に <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> + が含まれていた場合は、これまで通り一部を出力します。 + JSON エンコーディングが失敗した理由の一覧をすべて見るには、 + <function>json_last_error</function> を参照してください。 + 可能性がある理由の一つは、<parameter>value</parameter> に不正や UTF-8 文字列が含まれていることです。 + </entry> + </row> + <row> + <entry>5.5.0</entry> + <entry> + 不正な <parameter>value</parameter> であっても、<constant>E_WARNING</constant> は発生しなくなりました。 + </entry> + </row> + <row> <entry>5.4.0</entry> <entry> <parameter>options</parameter> パラメータに

« previous php.doc.ja (#5629) next »