Skip to content

TJSONApplier.Execute

Executes the JSON merge operation from apply JSON to source JSON

Declaration

Source position: fpjsonapply.pp line 64

public 
procedure TJSONApplier.Execute;  virtual;

Description

The Execute method performs the main JSON merge operation. It loads the source and apply JSON objects from files if they are not already set, then applies the elements from the apply JSON object to the source JSON object. The result is stored in the DestJSON property. If file paths are specified, it starts merging at those specific locations within the JSON structures. If a destination filename is specified, the result is automatically saved to that file.

Errors

Raises EJSON exceptions when:

  • Source JSON object is empty
  • Apply JSON object is empty
  • JSON files do not contain valid JSON objects
  • Specified source or apply paths are not found or do not point to JSON objects

See also

Name Description
TJSONApplier.SourceJSON Source JSON object to merge into
TJSONApplier.ApplyJSON JSON object containing elements to apply to the source
TJSONApplier.DestJSON Destination JSON object containing the merge result
TJSONApplier.SourcePath JSON path in source object where merging should start
TJSONApplier.ApplyPath JSON path in apply object where merging data should be taken from