mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
| <!--
 | |
|   Copyright JS Foundation and other contributors, http://js.foundation
 | |
| 
 | |
|   Licensed under the Apache License, Version 2.0 (the "License");
 | |
|   you may not use this file except in compliance with the License.
 | |
|   You may obtain a copy of the License at
 | |
| 
 | |
|   http://www.apache.org/licenses/LICENSE-2.0
 | |
| 
 | |
|   Unless required by applicable law or agreed to in writing, software
 | |
|   distributed under the License is distributed on an "AS IS" BASIS,
 | |
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
|   See the License for the specific language governing permissions and
 | |
|   limitations under the License.
 | |
| -->
 | |
| 
 | |
| <script type="text/x-red" data-help-name="json">
 | |
|     <p>Konvertiert zwischen einem JSON-String und seiner JavaScript-Objektdarstellung in beide Richtungen.</p>
 | |
|     <h3>Eingaben</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">Objekt | String</span></dt>
 | |
|         <dd>Ein JavaScript Objekt oder ein String.</dd>
 | |
|         <dt>schema<span class="property-type">Objekt</span></dt>
 | |
|         <dd>Ein optionales JSON Schema Objekt gegen das das JSON Objekt validiert wird.</dd>
 | |
|     </dl>
 | |
|     <h3>Ausgaben</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">Objekt | String</span></dt>
 | |
|         <dd>
 | |
|             <ul>
 | |
|                 <li>Wenn die Eingabe ein JSON-String ist, wird versucht ihn in ein JavaScript-Objekt zu parsen..</li>
 | |
|                 <li>Wenn die Eingabe ein JavaScript-Objekt ist, wird ein JSON-String erstellt. Der String kann optional gut formatiert werden.</li>
 | |
|             </ul>
 | |
|         </dd>
 | |
|         <dt>schemaError<span class="property-type">Array</span></dt>
 | |
|         <dd>Wenn die JSON-Schemavalidierung fehlschlägt, wird für den <code>Catch</code> Node eine <code>schemaError</code> Eigenschaft erstellt,
 | |
|             die ein Array von Fehlern enthält.</dd>
 | |
|     </dl>
 | |
|     <h3>Details</h3>
 | |
|     <p>Standardmäßig arbeitet der Node mit <code>msg.payload</code>, kann aber so konfiguriert werden, dass eine beliebige
 | |
|         Nachrichteneigenschaft konvertiert wird.</p>
 | |
|     <p>Der Node kann auch konfiguriert werden, um eine bestimmte Kodierung sicherzustellen, anstatt zwischen den beiden umzuschalten.
 | |
|         Dies kann z.B. mit dem <code>HTTP In</code> Node benutzt werden, um sicherzustellen, dass der Payload ein analysiertes Objekt ist,
 | |
|         auch wenn eine eingehende Anfrage seinen Inhaltstyp nicht korrekt eingestellt hat, damit der <code>HTTP In</code> Node
 | |
|         die Konvertierung durchführen kann.</p>
 | |
|     <p>Wenn der Node so konfiguriert ist, dass die Eigenschaft als String kodiert wird, und es einen String empfängt,
 | |
|         werden keine weiteren Prüfungen der Eigenschaft durchgeführt. 
 | |
|         Es wird weder prüfen, ob der String ein gültiges JSON enthält noch wird er ihn neu formatieren, wenn die Format-Option ausgewählt ist.</p>
 | |
|     <p>Für weitere Details über das JSON-Schema 
 | |
|         können Sie die <a href="http://json-schema.org/latest/json-schema-validation.html">Spezifikation</a> einsehen.</p>
 | |
| </script>
 |