REST.JsonReflect.TTypeMarshaller.MarshalConverter
Delphi
procedure MarshalConverter(Data: TObject; const Field: string); overload;
procedure MarshalConverter(Data: TObject; const Field: string; const ConverterEvent: TConverterEvent); overload;
procedure MarshalConverter(Data: TObject; const Field: string; const ConverterEvent: TJSONInterceptor); overload;
C++
void __fastcall MarshalConverter(System::TObject* Data, const System::UnicodeString Field)/* overload */;
void __fastcall MarshalConverter(System::TObject* Data, const System::UnicodeString Field, TConverterEvent* const ConverterEvent)/* overload */;
void __fastcall MarshalConverter(System::TObject* Data, const System::UnicodeString Field, TJSONInterceptor* const ConverterEvent)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | REST.JsonReflect.pas REST.JsonReflect.hpp |
REST.JsonReflect | TTypeMarshaller |
Description
Marshals the specified field of the specified object.
If you specify a converter, MarshalConverter uses the specified converter. Otherwise, MarshalConverter uses a converter previously-registered for the specified object class and field.
If you do not specify a custom converter, you must only call MarshalConverter if you know that there is a matching converter for the specified object class and field. You may use HasConverter to check that a matching converter exists:
Delphi:
if HasConverter(AClass, AFieldName) then
MarshalConverter(AClass, AFieldName);
C++:
if (HasConverter(AClass, AFieldName))
MarshalConverter(AClass, AFieldName);
MarshalData calls MarshalConverter.