svn: /phpdoc/de/trunk/reference/json/ book.xml constants.xml functions/json-decode.xml functions/json-encode.xml functions/json-last-error-msg.xml functions/json-last-error.xml
[email protected] (Christoph Michael Becker)
| Newsgroups | php.doc.de |
|---|---|
| Message-ID | <[email protected]> |
cmb Wed, 31 Jan 2018 13:40:26 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=344135
Log:
Sync with EN
Changed paths:
U phpdoc/de/trunk/reference/json/book.xml
U phpdoc/de/trunk/reference/json/constants.xml
U phpdoc/de/trunk/reference/json/functions/json-decode.xml
U phpdoc/de/trunk/reference/json/functions/json-encode.xml
U phpdoc/de/trunk/reference/json/functions/json-last-error-msg.xml
U phpdoc/de/trunk/reference/json/functions/json-last-error.xml
svn-diffs-344135.txt
(text/x-diff, 15.3 KB)
Modified: phpdoc/de/trunk/reference/json/book.xml
===================================================================
--- phpdoc/de/trunk/reference/json/book.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/book.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 331384 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 340847 Maintainer: sammywg Status: ready -->
<book xml:id="book.json" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="bundled" ?>
@@ -12,9 +12,11 @@
<para>
Diese Erweiterung implementiert das <link
xlink:href="&url.json;">JavaScript-Objekt-Notation
- (JSON)</link>-Datenaustauschformat. Die Dekodierung wird von
+ (JSON)</link>-Datenaustauschformat. Die Dekodierung in PHP 5 wird von
einem Parser übernommen, der auf dem JSON_checker
von Douglas Crockford basiert.
+ PHP 7 enthält einen vollständig neuen und verbesserten Parser, der eigens für
+ PHP geschrieben wurde, und unter der PHP-Lizenz lizensiert ist.
</para>
&json.implementation.superset;
</preface>
Modified: phpdoc/de/trunk/reference/json/constants.xml
===================================================================
--- phpdoc/de/trunk/reference/json/constants.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/constants.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 337480 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 342548 Maintainer: sammywg Status: ready -->
<appendix xml:id="json.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
@@ -88,15 +88,13 @@
(<type>integer</type>)
</term>
<listitem>
- <para>
+ <simpara>
Das an <function>json_encode</function> übergebene Objekt oder Array
enthält rekursive Referenzen und kann nicht kodiert werden. Wenn
die <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> Option übergeben
wurde, wird &null; an Stelle der rekursiven Referenz kodiert.
- </para>
- <para>
- Diese Konstante ist verfügbar seit PHP 5.5.0.
- </para>
+ Verfügbar seit PHP 5.5.0.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.json-error-inf-or-nan">
@@ -105,16 +103,14 @@
(<type>integer</type>)
</term>
<listitem>
- <para>
+ <simpara>
Der an <function>json_encode</function> übergebene Wert enthält entweder
<link linkend="language.types.float.nan"><constant>NAN</constant></link>
oder <link linkend="function.is-infinite"><constant>INF</constant></link>.
Wenn die <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> Option übergeben
wurde, wird <literal>0</literal> an Stelle dieser speziellen Zahlen kodiert.
- </para>
- <para>
- Diese Konstante ist verfügbar seit PHP 5.5.0.
- </para>
+ Verfügbar seit PHP 5.5.0.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.json-error-unsupported-type">
@@ -123,21 +119,78 @@
(<type>integer</type>)
</term>
<listitem>
- <para>
+ <simpara>
Der an <function>json_encode</function> übergebene Wert enthält einen
nicht unterstützten Typ, beispielweise <type>resource</type>.
Wenn die <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> Option übergeben
wurde, wird &null; an Stelle des nicht unterstützten Wertes kodiert.
- </para>
- <para>
- Diese Konstante ist verfügbar seit PHP 5.5.0.
- </para>
+ Verfügbar seit PHP 5.5.0.
+ </simpara>
</listitem>
+ </varlistentry>
+ <varlistentry xml:id="constant.json-error-invalid-property-name">
+ <term>
+ <constant>JSON_ERROR_INVALID_PROPERTY_NAME</constant>
+ (<type>integer</type>)
+ </term>
+ <listitem>
+ <simpara>
+ Ein Schlüssel beginnend mit einem \u0000 Zeichen war in der Zeichenkette
+ enthalten, die an <function>json_decode</function> übergeben wurde, wenn
+ ein JSON-Objekt in ein PHP-Objekt konvertiert werden sollte.
+ Verfügbar seit PHP 7.0.0.
+ </simpara>
+ </listitem>
</varlistentry>
+ <varlistentry xml:id="constant.json-error-utf16">
+ <term>
+ <constant>JSON_ERROR_UTF16</constant>
+ (<type>integer</type>)
+ </term>
+ <listitem>
+ <simpara>
+ Ein einzelnes, alleinstehendes UTF-16-Surrogat war im JSON-String enthalten, der an
+ <function>json_decode</function> übergeben wurde.
+ Verfügbar seit PHP 7.0.0.
+ </simpara>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>
Die folgenden Konstanten können kombiniert (verodert) werden,
+ um Optionen für <function>json_decode</function> zu bilden.
+ </para>
+ <variablelist>
+ <varlistentry xml:id="constant.json-bigint-as-string">
+ <term>
+ <constant>JSON_BIGINT_AS_STRING</constant>
+ (<type>integer</type>)
+ </term>
+ <listitem>
+ <simpara>
+ Dekodiert große Zahlen als ihre originale Zeichenkette.
+ Verfügbar seit PHP 5.4.0.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry xml:id="constant.json-object-as-array">
+ <term>
+ <constant>JSON_OBJECT_AS_ARRAY</constant>
+ (<type>integer</type>)
+ </term>
+ <listitem>
+ <simpara>
+ Dekodiert JSON-Objekte als PHP-Arrays. Diese Option kann automatisch
+ angefügt werden, indem <function>json_decode</function> mit &true; als
+ zweitem Parameter aufgerufen wird.
+ Verfügbar seit PHP 5.4.0.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Die folgenden Konstanten können kombiniert (verodert) werden,
um Optionen für <function>json_encode</function> zu bilden.
</para>
<variablelist>
@@ -215,18 +268,6 @@
</simpara>
</listitem>
</varlistentry>
- <varlistentry xml:id="constant.json-bigint-as-string">
- <term>
- <constant>JSON_BIGINT_AS_STRING</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <simpara>
- Kodiert große Zahlen als ihre originale Zeichenkette.
- Verfügbar seit PHP 5.4.0.
- </simpara>
- </listitem>
- </varlistentry>
<varlistentry xml:id="constant.json-pretty-print">
<term>
<constant>JSON_PRETTY_PRINT</constant>
@@ -288,6 +329,20 @@
</simpara>
</listitem>
</varlistentry>
+ <varlistentry xml:id="constant.json-unescaped-line-terminators">
+ <term>
+ <constant>JSON_UNESCAPED_LINE_TERMINATORS</constant>
+ (<type>integer</type>)
+ </term>
+ <listitem>
+ <simpara>
+ Die Zeilentrenner bleiben unmaskiert, wenn
+ <constant>JSON_UNESCAPE_UNICODE</constant> übergeben wird. Das ist das
+ gleiche Verhalten wie vor PHP 7.1 ohne diese Konstante.
+ Verfügbar seit PHP 7.1.0.
+ </simpara>
+ </listitem>
+ </varlistentry>
</variablelist>
</appendix>
Modified: phpdoc/de/trunk/reference/json/functions/json-decode.xml
===================================================================
--- phpdoc/de/trunk/reference/json/functions/json-decode.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/functions/json-decode.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 333677 Maintainer: simp Status: ready -->
+<!-- EN-Revision: 343899 Maintainer: simp Status: ready -->
<!-- Credits: sammywg -->
<refentry xml:id="function.json-decode" xmlns="http://docbook.org/ns/docbook">
@@ -14,7 +14,7 @@
<methodsynopsis>
<type>mixed</type><methodname>json_decode</methodname>
<methodparam><type>string</type><parameter>json</parameter></methodparam>
- <methodparam choice="opt"><type>bool</type><parameter>assoc</parameter><initializer>false</initializer></methodparam>
+ <methodparam choice="opt"><type>bool</type><parameter>assoc</parameter><initializer>&false;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>depth</parameter><initializer>512</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
@@ -60,10 +60,15 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
- Bitmaske mit JSON-Dekodieroptionen. Derzeit ist nur
- <constant>JSON_BIGINT_AS_STRING</constant>
- unterstützt (standardmäßig werden große Ganzzahlen
+ Bitmaske mit JSON-Dekodieroptionen.
+ Derzeit werden zwei Optionen unterstützt. Die erste ist
+ <constant>JSON_BIGINT_AS_STRING</constant>,
+ die es erlaubt, große Ganzzahlen als Zeichenketten anstatt Floats zu
+ kodieren (standardmäßig werden große Ganzzahlen
in Fließkommazahlen umgewandelt).
+ Die zweite Option ist <constant>JSON_OBJECT_AS_ARRAY</constant>, das den
+ selben Effekt hat, wie &true; an <parameter>assoc</parameter> zu
+ übergeben.
</para>
</listitem>
</varlistentry>
@@ -293,6 +298,29 @@
</thead>
<tbody>
<row>
+ <entry>7.1.0</entry>
+ <entry>
+ Ein leerer JSON-Schlüssel ("") kann als leere Objekt-Eigenschaft kodiert
+ werden, anstatt dass ein Schlüssel mit dem Wert
+ <literal>_empty_</literal> verwendet wird.
+ </entry>
+ </row>
+ <row>
+ <entry>7.0.0</entry>
+ <entry>
+ Nicht RFC 7159 konforme Zahlenformate werden zurückgewiesen; auf
+ oberster Ebene (07, 0xff, .1, -.1) und auf allen Ebenen ([1.], [1.e1]).
+ </entry>
+ </row>
+ <row>
+ <entry>7.0.0</entry>
+ <entry>
+ Ein leerer PHP-String oder ein Wert der nach der Konvertierung zu String
+ ein Leerstring ist (<literal>NULL</literal>, <literal>FALSE</literal>),
+ resultiert in einem JSON Syntaxfehler.
+ </entry>
+ </row>
+ <row>
<entry>5.6.0</entry>
<entry>
Ungültige nicht kleingeschriebene Varianten von
Modified: phpdoc/de/trunk/reference/json/functions/json-encode.xml
===================================================================
--- phpdoc/de/trunk/reference/json/functions/json-encode.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/functions/json-encode.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 336513 Maintainer: simp Status: ready -->
+<!-- EN-Revision: 342210 Maintainer: simp Status: ready -->
<!-- Credits: sammywg -->
<refentry xml:id="function.json-encode" xmlns="http://docbook.org/ns/docbook">
@@ -18,9 +18,14 @@
<methodparam choice="opt"><type>int</type><parameter>depth</parameter><initializer>512</initializer></methodparam>
</methodsynopsis>
<para>
- Gibt eine Zeichenkette zurück, die die JSON-Darstellung von
+ Gibt eine Zeichenkette zurück, die die JSON-Darstellung des übergebenen
<parameter>value</parameter> beinhaltet.
</para>
+ <para>
+ Die Kodierung wird von den übergebenen <parameter>options</parameter>
+ beeinflusst, und zusätzlich hängt die Kodierung von Float-Werten vom Wert von
+ <link linkend="ini.serialize-precision">serialize_precision</link> ab.
+ </para>
</refsect1>
<refsect1 role="parameters">
@@ -53,7 +58,8 @@
<constant>JSON_UNESCAPED_SLASHES</constant>,
<constant>JSON_FORCE_OBJECT</constant>,
<constant>JSON_PRESERVE_ZERO_FRACTION</constant>,
- <constant>JSON_UNESCAPED_UNICODE</constant>.
+ <constant>JSON_UNESCAPED_UNICODE</constant>,
+ <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant>.
Das Verhalten dieser Konstanten ist auf der Seite über die
<link linkend="json.constants">JSON Konstanten</link>
beschrieben.
@@ -93,6 +99,14 @@
</thead>
<tbody>
<row>
+ <entry>7.1.0</entry>
+ <entry>
+ <link linkend="ini.serialize-precision">serialize_precision</link> wird
+ nun anstatt <link linkend="ini.precision">precision</link> verwendet,
+ wenn Double-Werte kodiert werden.
+ </entry>
+ </row>
+ <row>
<entry>5.6.6</entry>
<entry>
Die <constant>JSON_PRESERVE_ZERO_FRACTION</constant> <parameter>option</parameter> wurde hinzugefügt.
@@ -105,6 +119,19 @@
</entry>
</row>
<row>
+ <entry>5.5.0</entry>
+ <entry>
+ Die <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> Option wurde hinzugefügt.
+ </entry>
+ </row>
+ <row>
+ <entry>5.5.0</entry>
+ <entry>
+ Der Rückgabewert im Fehlerfall wurde von der <literal>null</literal>
+ Zeichenkette zu &false; geändert.
+ </entry>
+ </row>
+ <row>
<entry>5.4.0</entry>
<entry>
<constant>JSON_PRETTY_PRINT</constant>, <constant>JSON_UNESCAPED_SLASHES</constant>, und <constant>JSON_UNESCAPED_UNICODE</constant> für <parameter>options</parameter> wurden hinzugefügt.
@@ -226,7 +253,7 @@
?>
]]>
</programlisting>
- &example.outputs;
+ &example.outputs.similar;
<screen>
<![CDATA[
Zeichenketten, die Zahlen repräsentieren, die automatisch in Zahlen gewandelt wurden
Modified: phpdoc/de/trunk/reference/json/functions/json-last-error-msg.xml
===================================================================
--- phpdoc/de/trunk/reference/json/functions/json-last-error-msg.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/functions/json-last-error-msg.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334064 Maintainer: tihox Status: ready -->
+<!-- EN-Revision: 343770 Maintainer: tihox Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.json-last-error-msg" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -29,7 +29,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Gibt bei Erfolg die Fehlermeldung zurück, <literal>"No Error"</literal>,
+ Gibt bei Erfolg die Fehlermeldung zurück, <literal>"No error"</literal>,
wenn kein Fehler aufgetreten ist. &return.falseforfailure;
</para>
</refsect1>
Modified: phpdoc/de/trunk/reference/json/functions/json-last-error.xml
===================================================================
--- phpdoc/de/trunk/reference/json/functions/json-last-error.xml 2018-01-31 12:33:50 UTC (rev 344134)
+++ phpdoc/de/trunk/reference/json/functions/json-last-error.xml 2018-01-31 13:40:26 UTC (rev 344135)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 331633 Maintainer: sammywg Status: ready -->
+<!-- EN-Revision: 341024 Maintainer: sammywg Status: ready -->
<refentry xml:id="function.json-last-error" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -91,6 +91,16 @@
<entry>Ein Wert eines Typs, der nicht kodiert werden kann, wurde übergeben</entry>
<entry>PHP 5.5.0</entry>
</row>
+ <row>
+ <entry><constant>JSON_ERROR_INVALID_PROPERTY_NAME</constant></entry>
+ <entry>Ein Eigenschaftsname, der nicht kodiert werden kann, wurde übergeben</entry>
+ <entry>PHP 7.0.0</entry>
+ </row>
+ <row>
+ <entry><constant>JSON_ERROR_UTF16</constant></entry>
+ <entry>Deformierte UTF-16 Zeichen; möglicherweise fehlerhaft kodiert</entry>
+ <entry>PHP 7.0.0</entry>
+ </row>
</tbody>
</tgroup>
</table>