Contents

jsonData(includeReportMetadata:jsonOptions:)

Returns the evaluation results as JSON data.

Declaration

func jsonData(includeReportMetadata: Bool = false, jsonOptions: JSONSerialization.WritingOptions = [.prettyPrinted, .sortedKeys]) throws -> Data

Parameters

  • includeReportMetadata:

    Whether to include report metadata. Defaults to false.

  • jsonOptions:

    The writing options for the final JSON serialization. Defaults to [.prettyPrinted, .sortedKeys].

Return Value

The JSON representation of the evaluation results as Data.

Discussion

The data contains sections for summary, results, metadata, and optionally report metadata.

See Also

Saving and loading results