TsgcAIDocumentExtractor › Methods › GetPresetSchema

GetPresetSchema Method

Returns the JSON Schema of a built in preset.

Syntax

class function GetPresetSchema(aPreset: TsgcAIDocumentPreset): string;

Parameters

NameTypeDescription
aPresetTsgcAIDocumentPresetThe preset whose schema is returned.

Return Value

The JSON Schema text. (string)

Remarks

Class method. The schema is strict mode compatible, so it can be copied into Schema, adapted (for example adding a purchase_order field to the invoice) and used with Preset set to dpCustom. Returns an empty string for dpCustom.

Example

oExtractor.Schema.Text := TsgcAIDocumentExtractor.GetPresetSchema(dpInvoice);
oExtractor.Preset := dpCustom;

Back to Methods