System.JSON.Writers.TJsonTextWriter.WriteUndefined

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

procedure WriteUndefined; override;

C++

virtual void __fastcall WriteUndefined();

Propriétés

Type Visibilité  Source Unité  Parent
procedure
function
public
System.JSON.Writers.pas
System.JSON.Writers.hpp
System.JSON.Writers TJsonTextWriter


Description

Ecrit une valeur non définie.

Voir l'extrait de code ci-dessous pour illustrer l'utilisation de WriteUndefined :

  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.WriteUndefined;
  Writer.WriteEndObject;
  Writer.WriteEndArray;
{
  "colors": [
    {
      /*Hexadecimal value for the red color*/
      "name": "red",
      "hex": Undefined
    }
  ]
}

Voir aussi