TJSONApplier class
Component class for applying (merging) JSON objects
Declaration
TJSONApplier = class(TComponent)Inheritance
- TJSONApplier
- TComponent
- TPersistent
- TObject
Description
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.
Errors
Raises EJSON exceptions when:
- Source or apply JSON objects are empty
- JSON files do not contain valid JSON objects
- Specified paths are not found in the JSON structures
See also
Properties
SourceJSON | public | Source JSON object to merge into |
ApplyJSON | public | JSON object containing elements to apply to the source |
DestJSON | public | Destination JSON object containing the merge result |
OwnsJSON | public | Set specifying which JSON objects are owned by the component |
SourceFileName | published | Filename to load source JSON from if SourceJSON is not set |
SourcePath | published | JSON path in source object where merging should start |
ApplyFileName | published | Filename to load apply JSON from if ApplyJSON is not set |
ApplyPath | published | JSON path in apply object where merging data should be taken from |
DestFileName | published | Filename to write the destination JSON to after merging |
CloneSource | published | Controls whether to make a clone copy of source JSON before applying changes |
CaseInsensitive | published | Controls whether property name matching is case sensitive |
ForceCorrectType | published | Controls whether to overwrite properties when types differ between source and apply JSON |
RemoveNonExisting | published | Controls whether to remove properties from source that do not exist in apply JSON |
Formatted | published | Controls whether output JSON is formatted with indentation and line breaks |
Methods
Apply | protected | |
SaveDestJSON | protected | |
destroy | public | Destructor that frees owned JSON objects and cleans up resources |
Execute | public | Executes the JSON merge operation from apply JSON to source JSON |
Inherited
From TComponent (75)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle Create DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
