Table of Contents

TTMSFNCPersistence Class

Provides static class methods for JSON-based serialization and deserialization of Delphi objects using RTTI.

API unit family: TMSFNCPersistence

Syntax

TTMSFNCPersistence = class

Properties

Name Description
ExcludeProperties Specifies an array of property names to exclude from all persistence operations.
IOReference Sets a reference object passed to custom read/write property callbacks.
RootObject Sets the root object used to resolve relative property references during serialization and deserialization.

Methods

Name Description
CreateObject Creates a new instance of the named class, verifying it descends from the given base class.
GetEnumName Returns the string name for the given enumeration value.
GetEnumValues Enumerates all valid string names for the enumeration type described by the given property info.
GetGenericDictionaryValueType Returns the value class of a generic dictionary class, or nil if not a supported dictionary.
GetGenericListType Returns the element class of a generic list class, or nil if the class is not a supported generic list.
GetPropInfoDataTypeInfo Returns the type info pointer for the underlying data type of the given property.
GetPropInfoDataTypeInfoClassType Returns the class type described by the given property's data type info.
GetPropInfoName Returns the name of the given property as declared in source.
GetPropInfoType Returns the type kind of the given property.
GetPropInfoTypeName Returns the type name of the given property's underlying data type.
IsAssignableProperty Returns whether the given property is eligible for serialization or deserialization.
IsBitmap Returns whether the given class is a recognized bitmap type.
IsCollection Returns whether the given class descends from TCollection.
IsColor Returns whether the given property name represents a color value.
IsComponent Returns whether the given class descends from TComponent.
IsControl Returns whether the given class descends from a visual control base class.
IsDate Returns whether the given property name represents a date value.
IsDateTime Returns whether the given property name represents a date-time value.
IsDescendingClass Returns whether the given class descends from any class in the specified name list.
IsFillKind Returns whether the given property name represents a fill kind value.
IsGenericDictionary Returns whether the given class is a supported generic dictionary type.
IsGenericDictionaryValueTypeBoolean Returns whether the value type of a generic dictionary class is a Boolean.
IsGenericDictionaryValueTypeDouble Returns whether the value type of a generic dictionary class is a floating-point number.
IsGenericDictionaryValueTypeInteger Returns whether the value type of a generic dictionary class is an integer.
IsGenericDictionaryValueTypeObject Returns whether the value type of a generic dictionary class is an object.
IsGenericIntegerDictionary Returns whether the given class is a generic dictionary keyed by integers.
IsGenericList Returns whether the given class is a supported generic list type.
IsGenericStringDictionary Returns whether the given class is a generic dictionary keyed by strings.
IsList Returns whether the given class descends from TList.
IsReadOnly Returns whether the given property has only a getter and no setter.
IsStrings Returns whether the given class descends from TStrings.
IsStrokeKind Returns whether the given property name represents a stroke kind value.
IsTime Returns whether the given property name represents a time-of-day value.
IsWriteOnly Returns whether the given property has only a setter and no getter.
LoadSettingsFromFile Populates the given object from a JSON file.
LoadSettingsFromStream Populates the given object from a JSON stream.
SaveSettingsToFile Serializes the given object to a JSON file.
SaveSettingsToStream Serializes the given object to a stream as JSON.

Events

Name Description
OnCustomReadProperty Fires before a property is read during deserialization, allowing the handler to override the value.
OnCustomWriteProperty Fires before a property is written during serialization, allowing the handler to override the output.

Used by