TCustomJSONPropStorage class
Implements the base class used to store session properties to a file in JSON format.
Declaration
TCustomJSONPropStorage = class(TFormPropertyStorage)Inheritance
- TCustomJSONPropStorage
- TFormPropertyStorage
- TControlPropertyStorage
- TCustomPropertyStorage
- TComponent
- TPersistent
- TObject
Descends from it: TJSONPropStorage
Description
TCustomJSONPropStorage is a
TFormPropertyStorage
descendant which defines a class used to store session properties for a form or
frame to a file using JSON (JavaScript Object Notation) format. It extends the
ancestor class with properties and methods needed to access the JSON storage
mechanism (TJSONConfig) for the class instance.
Use the SessionProperties property in the TForm (or TFrame) instance which owns the class to define the component and property names written to the JSON storage mechanism.
Use JSONFileName to specify the path and file name to the file where the JSON content for the session properties is stored.
Use RootObjectPath to specify the path to the JSON object where the session properties is stored in the JSON file.
Use Formatted to control whether formatting options for the JSONConfig file are enabled for the storage mechanism.
TCustomJSONPropStorage includes overridden methods used to read, write, and maintain entries in the JSON storage mechanism.
Do not create instances of TCustomJSONPropStorage; use the TJSONPropStorage descendant instead.
See also
Properties
JSONConf | protected | TJSONConfig instance used to store path/value pairs. |
JSONFileName | public | Name of the file where the session property names and values are saved in JSON format. |
RootObjectPath | public | Name of the root JSON object in the JSON file where session properties are stored. |
Formatted | public | Controls whether formatted JSON is emitted in the JSONConf storage mechanism. |
Methods
GetJSONFileName | protected | Gets the value for the JSONFileName property. |
RootSection | protected | Returns the name of the RootSection for the storage mechanism. |
GetFormatted | protected | Gets the value for the Formatted property. |
SetFormatted | protected | Sets the value for the Formatted property. |
FixPath | protected | Converts component/property names using '.' delimiters to the '/' delimiter used for the JSON notation in the JSONConfig storage mechanism. |
StorageNeeded | public | Ensures that the TJSONConfig storage mechanism for the class instance is allocated and configured when needed. |
FreeStorage | public | Frees the TJSONConfig storage mechanism when no longer needed. |
DoReadString | public | Performs actions needed to read the value for the specified section and identifier as a String type. |
DoWriteString | public | Performs actions needed to write the specified Section and Ident to the JSON storage mechanism as a String type. |
DoEraseSections | public | Performs actions needed to remove the entry (and all of its child entries) at the specified path in the JSON storage. |
Inherited
From TControlPropertyStorage (1)
From TCustomPropertyStorage (28)
Active DoReadInteger DoWriteInteger EraseSections FinishPropertyList GetRoot OnRestoreProperties OnRestoringProperties OnSaveException OnSaveProperties OnSavingProperties ReadBoolean ReadInteger ReadRect ReadString ReadStrings Restore RestoreProperties Root Save SaveProperties StoredValue StoredValues WriteBoolean WriteInteger WriteRect WriteString WriteStrings
From TComponent (74)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle 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.
