TsgcAIDocumentExtractor › Methods › GetPresetSchema
Returns the JSON Schema of a built in preset.
class function GetPresetSchema(aPreset: TsgcAIDocumentPreset): string;
| Name | Type | Description |
|---|---|---|
aPreset | TsgcAIDocumentPreset | The preset whose schema is returned. |
The JSON Schema text. (string)
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.
oExtractor.Schema.Text := TsgcAIDocumentExtractor.GetPresetSchema(dpInvoice);
oExtractor.Preset := dpCustom;