[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Component class for applying (merging) JSON objects
Source position: fpjsonapply.pp line 37
type TJSONApplier = class(TComponent) |
||
public |
||
destructor destroy; override; |
|
Destructor that frees owned JSON objects and cleans up resources |
procedure Execute; virtual; |
|
Executes the JSON merge operation from apply JSON to source JSON |
property SourceJSON: TJSONObject; [rw] |
|
Source JSON object to merge into |
property ApplyJSON: TJSONObject; [rw] |
|
JSON object containing elements to apply to the source |
property DestJSON: TJSONObject; [r] |
|
Destination JSON object containing the merge result |
property OwnsJSON: TOwnsJSONs; [rw] |
|
Set specifying which JSON objects are owned by the component |
published |
||
property SourceFileName: string; [rw] |
|
Filename to load source JSON from if SourceJSON is not set |
property SourcePath: string; [rw] |
|
JSON path in source object where merging should start |
property ApplyFileName: string; [rw] |
|
Filename to load apply JSON from if ApplyJSON is not set |
property ApplyPath: string; [rw] |
|
JSON path in apply object where merging data should be taken from |
property DestFileName: string; [rw] |
|
Filename to write the destination JSON to after merging |
property CloneSource: Boolean; [rw] |
|
Controls whether to make a clone copy of source JSON before applying changes |
property CaseInsensitive: Boolean; [rw] |
|
Controls whether property name matching is case sensitive |
property ForceCorrectType: Boolean; [rw] |
|
Controls whether to overwrite properties when types differ between source and apply JSON |
property RemoveNonExisting: Boolean; [rw] |
|
Controls whether to remove properties from source that do not exist in apply JSON |
property Formatted: Boolean; [rw] |
|
Controls whether output JSON is formatted with indentation and line breaks |
end; |
|
Component class for applying (merging) JSON objects |
|
| | | ||
| | | ||
| | | ||
The TJSONApplier class is a component that provides functionality to apply (merge) elements from one JSON object to another. It supports loading JSON objects from files or working with existing objects in memory, with various configuration options for controlling the merge behavior. The component can merge at specific paths within JSON structures, handle type conflicts, control case sensitivity, and manage object ownership.
Raises EJSON exceptions when:
|
Enumeration values for JSON object ownership control |
|
|
Set of JSON object ownership flags |