Sign in Join
FPDoc Onlineexperiment

TJSONDataWriter.ExtractData function

Member of TJSONDataWriterpublicIn unit JsonWriter

Extract the created JSON data tree

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.