Skip to content

TJSONDataWriter.ExtractData

Extract the created JSON data tree

Declaration

Source position: jsonwriter.pp line 95

public 
function TJSONDataWriter.ExtractData : TJSONData;

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

Name Description
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