Sign in Join
FPDoc Onlineexperiment

TJSONData.Clone function

Member of TJSONDatapublicIn unit fpJson

Duplicate the value of the JSON data.

Declaration

pascal
function Clone: TJSONData; virtual; abstract

Function result

A new instance with the same JSON representation.

Description

Clone returns a new instance of the TJSONData descendent that has the same value as the instance, i.e. the AsJSON property of the instance and its clone is the same.

Note that the clone must be freed by the caller. Freeing a JSON object will not free its clones.

Errors

Normally, no JSON-specific errors should occur, but an EOutOfMemory exception can be raised.

See also

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