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

TJSONDataWriter.ExtractData

Extract the created JSON data tree

Declaration

Source position: jsonwriter.pp line 95

public function TJSONDataWriter.ExtractData: TJSONData;

Function result

The created JSON data structure with ownership transferred to caller

Description

ExtractData returns the complete JSON data structure that has been built and transfers ownership to the caller. After calling this method, the writer no longer owns the JSON data, and the caller is responsible for freeing it. This method calls Flush internally to validate the state before extraction.

Errors

EJSONWriter is raised if no objects have been created on the stack.

See also

Flush

  

Validate the internal state for data extraction

TJSONData

  

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

EJSONWriter

  

Exception class for JSON writing errors


Documentation generated on: Jan 27 2026