REST.JsonReflect.TTypeMarshaller.MarshalConverter

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure MarshalConverter(Data: TObject; Field: string); overload;
procedure MarshalConverter(Data: TObject; Field: string; ConverterEvent: TConverterEvent); overload;
procedure MarshalConverter(Data: TObject; Field: string; ConverterEvent: TJSONInterceptor); overload;

C++

void __fastcall MarshalConverter(System::TObject* Data, System::UnicodeString Field)/* overload */;
void __fastcall MarshalConverter(System::TObject* Data, System::UnicodeString Field, TConverterEvent* ConverterEvent)/* overload */;
void __fastcall MarshalConverter(System::TObject* Data, System::UnicodeString Field, TJSONInterceptor* 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.

See Also