Skip to main content

validate_report_payload

Function validate_report_payload 

Source
pub fn validate_report_payload(
    data: &Value,
) -> Result<(), ReportValidationError>
Expand description

Validate a §7.3 report payload’s structural shape.

Rejects anything obviously not a report before the reducer ever sees it, so the caller can name the offending field instead of bubbling a generic CorruptEventLog. Keeps the current validation logic verbatim; this is a relocation, not a tightening.

§Errors

Returns a ReportValidationError describing the first schema violation found.