Unit 'JsonWriter' Package
[Overview][Classes][Index] [#fcl]

TJSONDataWriter

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

JSON writer that builds TJSONData tree in memory

Declaration

Source position: jsonwriter.pp line 70

type TJSONDataWriter = class(TAbstractJSONWriter)

public

  destructor destroy; override;

  

Destroy the writer and free any created JSON data

  procedure EndArray; override;

  

End writing a JSON array

  procedure EndObject; override;

  

End writing a JSON object

  procedure EndProperty; override;

  

End writing a property in a JSON object

  procedure NextElement; override;

  

Prepare for the next element in a JSON array

  procedure StartArray; override;

  

Start writing a JSON array

  procedure StartObject; override;

  

Start writing a JSON object

  procedure StartProperty(); override;

  

Start writing a property in a JSON object

  procedure WriteValue();

  

Write a JSON value to the current position

  procedure Flush; override;

  

Validate the internal state for data extraction

  function ExtractData;

  

Extract the created JSON data tree

end;

Inheritance

TJSONDataWriter

  

JSON writer that builds TJSONData tree in memory

|

TAbstractJSONWriter

  

Abstract base class for JSON writers

|

TObject

Description

TJSONDataWriter is a JSON writer implementation that builds a TJSONData tree in memory. This writer maintains an internal stack of JSON objects and arrays and constructs the complete JSON data structure as it writes. The resulting TJSONData can be extracted using ExtractData.

See also

TAbstractJSONWriter

  

Abstract base class for JSON writers

TJSONStreamWriter

  

JSON writer that writes directly to a stream

ExtractData

  

Extract the created JSON data tree

TJSONData

  

Base (abstract) object for all JSON based data types.


Documentation generated on: Jan 27 2026