API:System.JSON.BSON.TBsonWriter.WriteEndArray
Delphi
procedure WriteEndArray; override;
C++
virtual void __fastcall WriteEndArray();
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
procedure function |
public | System.JSON.BSON.pas System.JSON.BSON.hpp |
System.JSON.BSON | TBsonWriter |
Description
Ecrit la fin d'un tableau.
System.JSON.BSON.TBsonWriter.WriteEndArray hérite de System.JSON.Writers.TJsonWriter.WriteEndArray. Tout le contenu en-dessous de cette ligne se réfère à System.JSON.Writers.TJsonWriter.WriteEndArray.
Ecrit la fin d'un tableau.
Voir l'extrait de code ci-dessous pour illustrer l'utilisation de WriteEndArray :
Writer.WriteStartObject;
Writer.WritePropertyName('colors');
Writer.WriteStartArray;
Writer.WriteStartObject;
Writer.WriteComment('Hexadecimal value for the red color');
Writer.WritePropertyName('name');
Writer.WriteValue('red');
Writer.WritePropertyName('hex');
Writer.WriteValue('#f00');
Writer.WriteEndObject;
Writer.WriteEndArray;
{
"colors": [
{
/*Hexadecimal value for the red color*/
"name": "red",
"hex": "#f00"
}
]
}