ClearJSONElements()

Syntaxe

ClearJSONElements(JSONValeur)
Description
Efface tous les éléments d'un tableau JSON de type #PB_JSON_Array.

Arguments

JSONValeur La valeur JSON.

Doit être du type #PB_JSON_Array.

Valeur de retour

Aucune.

Exemple

  ParseJSON(0, "[1, 2, 3, 4]")
  
  ; efface le tableau et ajoute un nouveau texte
  ClearJSONElements(JSONValue(0))
  SetJSONString(AddJSONElement(JSONValue(0)), "Hello")
  
  Debug ComposeJSON(0)

  ; Résultat : ["Hello"]

Voir aussi

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

OS Supportés

Tous

<- CatchJSON() - Json Index - ClearJSONMembers() ->