Data.DBXJSONReflect.JSONReflect.Create
Delphi
constructor Create(IsMarshalOwned: Boolean); overload;
constructor Create(ConverterType: TConverterType; ReverterType: TReverterType; InterceptorType: TClass = nil; PopulationCustomizerType: TClass = nil; IsMarshalOwned: Boolean = false); overload;
C++
__fastcall JSONReflect(bool IsMarshalOwned)/* overload */;
__fastcall JSONReflect(TConverterType ConverterType, TReverterType ReverterType, System::TClass InterceptorType, System::TClass PopulationCustomizerType, bool IsMarshalOwned)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | Data.DBXJSONReflect.pas Data.DBXJSONReflect.hpp |
Data.DBXJSONReflect | JSONReflect |
Description
Creates an instance of JSONReflect.
The Create method creates an instance of JSONReflect. The Create method has two overloads. One of the overloads is called with the IsMarshalOwned
Boolean parameter. The second overload of Create must be called with the ConverterType
, ReverterType
, InterceptorType
, PopulationCustomizerType
, and IsMarshalOwned
parameters.
IsMarshalOwned
affects fields initialized in the Create constructor. If a field is not marked with the JSONReflect attribute and IsMarshalOwned
is set as True, and the field is marshaled, then the field holds a reference to a constructor-initialized object. The object will be destroyed before deserializing the fields. If a field is marked with the JSONReflect attribute and IsMarshalOwned
is set as False, then the object will not be destroyed before population, but may be overwritten, which could result in a memory leak. By default, IsMarshalOwned
is True.
ConverterType
specifies one of the supported converter types.
ReverterType
specifies one of the supported reverter types.
InterceptorType
specifies the type of the interceptor, essentially a TClass.
PopulationCustomizerType
specifies the type of population, essentially a TClass, implemented as a subclass of TJSONPopulationCustomizer.
See Also
- Serializing User Objects, located in Developing DataSnap Applications.