Contents

jsonData(includeReportMetadata:includeTranscripts:jsonOptions:)

Returns the evaluation results as JSON data.

Declaration

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

Parameters

  • includeReportMetadata:

    Whether to include report metadata. Defaults to false.

  • includeTranscripts:

    Whether to encode each row’s transcript into the Transcript column as JSON. Defaults to false to keep file size small for runs that don’t need transcripts in the artifact.

  • 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