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.

class function ExportToDelphi(AJSONString: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; 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.

class function ExportToDelphi(AJSONString: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; 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.

class function ExportToDelphi(AJSONValue: TJSONValue; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; 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.

class function ExportToDelphi(AJSONValue: TJSONValue; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; 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.