Skip to main content
Table of Contents

TTMSFNCJSONToClass.ExportToDelphi Method

Generates Delphi class source from a JSON string using the specified options.

API unit family: TMSFNCPersistence Declaring type: TTMSFNCJSONToClass

Overloads

Overload 1

Generates Delphi class source from a JSON string using the specified options.

FMX.TMSFNCPersistence.hppPascalC++
class function ExportToDelphi(AJSONString: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;
__classmethod System::UnicodeString __fastcall ExportToDelphi(System::UnicodeString AJSONString, const TTMSFNCJSONToClassOptions &AOptions, _di_TTMSFNCJSONToClassExportEvent ACallBack = _di_TTMSFNCJSONToClassExportEvent())/* overload */;

Parameters

Name Description
AJSONString JSON text used as the source schema.
AOptions Generation options for class names, members, unit output, and implementation output.
ACallBack Optional callback that can adjust generated property names and types.

Returns

The generated Delphi source text.

Overload 2

Generates Delphi class source from a JSON string using default options.

FMX.TMSFNCPersistence.hppPascalC++
class function ExportToDelphi(AJSONString: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;
__classmethod System::UnicodeString __fastcall ExportToDelphi(System::UnicodeString AJSONString, _di_TTMSFNCJSONToClassExportEvent ACallBack = _di_TTMSFNCJSONToClassExportEvent())/* overload */;

Parameters

Name Description
AJSONString JSON text used as the source schema.
ACallBack Optional callback that can adjust generated property names and types.

Returns

The generated Delphi source text.

Overload 3

Generates Delphi class source from a parsed JSON value using the specified options.

FMX.TMSFNCPersistence.hppPascalC++
class function ExportToDelphi(AJSONValue: TJSONValue; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;
__classmethod System::UnicodeString __fastcall ExportToDelphi(System::Json::TJSONValue* AJSONValue, const TTMSFNCJSONToClassOptions &AOptions, _di_TTMSFNCJSONToClassExportEvent ACallBack = _di_TTMSFNCJSONToClassExportEvent())/* overload */;

Parameters

Name Description
AJSONValue Parsed JSON value used as the source schema.
AOptions Generation options for class names, members, unit output, and implementation output.
ACallBack Optional callback that can adjust generated property names and types.

Returns

The generated Delphi source text.

Overload 4

Generates Delphi class source from a parsed JSON value using default options.

FMX.TMSFNCPersistence.hppPascalC++
class function ExportToDelphi(AJSONValue: TJSONValue; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;
__classmethod System::UnicodeString __fastcall ExportToDelphi(System::Json::TJSONValue* AJSONValue, _di_TTMSFNCJSONToClassExportEvent ACallBack = _di_TTMSFNCJSONToClassExportEvent())/* overload */;

Parameters

Name Description
AJSONValue Parsed JSON value used as the source schema.
ACallBack Optional callback that can adjust generated property names and types.

Returns

The generated Delphi source text.