SetJSONArray()

Syntax

Ergebnis = SetJSONArray(JSONWert)
Beschreibung
Ändert den Typ des JSON-Wertes auf #PB_JSON_Array. Das Array wird dann keine Elemente enthalten (auch nicht, wenn der Wert vorher Array-Elemente enthielt).

Parameter

JSONWert Der JSON-Wert.

Rückgabewert

Gibt die Array-Nummer zurück, andernfalls Null.

Beispiel

  If CreateJSON(0)
    ArrayValue = SetJSONArray(JSONValue(0))
    SetJSONString(AddJSONElement(ArrayValue), "hello")
    SetJSONString(AddJSONElement(ArrayValue), "world")
    
    Debug ComposeJSON(0)
  EndIf

Siehe auch

AddJSONElement(), RemoveJSONElement(), ResizeJSONElements(), ClearJSONElements(), GetJSONElement(), JSONArraySize(), JSONType()

Unterstützte OS

Alle

<- SaveJSON() - Json Inhaltsverzeichnis - SetJSONBoolean() ->