Metoda THotPDF.ComplianceFindingsToJSON
Serializes shared validation and repair findings into deterministic JSON for CI, audit storage, and external compliance tooling
Declaration
function ComplianceFindingsToJSON(
const Findings: THPDFComplianceFindings): AnsiString;
Unit
HPDFDoc
Finding model
THPDFComplianceFinding contains the following fields
| Field | Purpose |
|---|---|
Profile | Identifies cpfPDFUA2, cpfPDFA4, or cpfPDFX6 |
Severity | Identifies informational, warning, or error findings through THPDFComplianceSeverity |
RuleID | Provides the stable namespaced rule identifier |
Clause | Provides the applicable standard and clause reference |
Path | Provides the logical object-graph location |
ObjectNumber | Provides the indirect object number or a negative value when unknown |
PageIndex | Provides the zero-based page index or a negative value when unknown |
Message | Provides a human-readable diagnostic |
RepairStatus | Identifies not attempted, applied, unresolved, rolled back, or failed repair provenance through THPDFComplianceRepairStatus |
RepairAction | Names the repair family when repair was attempted |
RepairCount | Counts applied operations represented by the finding |
JSON contract
The root schema identifier is hotpdf.compliance.findings.v1, findings retain deterministic input order, and every object uses a stable field order
Unknown object and page locations are serialized as JSON null, while the first page remains the numeric value 0
Strings are JSON escaped, control characters use standard escapes, and an empty finding array produces a valid document with an empty findings array
Example
var
Options: THPDFPDFA4ValidationOptions;
Findings: THPDFComplianceFindings;
JSON: AnsiString;
begin
Options := THPDFPDFA4ValidationOptions.Default;
PDF.ValidatePDFA4(Options, Findings);
JSON := PDF.ComplianceFindingsToJSON(Findings);
end;