<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/EvaluationResult/jsonData(includeReportMetadata:includeTranscripts:jsonOptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations16EvaluationResultV8jsonData21includeReportMetadata0F11Transcripts0D7Options10Foundation0E0VSb_SbSo013NSJSONWritingJ0VtKF"
  },
  "title" : "jsonData(includeReportMetadata:includeTranscripts:jsonOptions:)"
}
-->

# jsonData(includeReportMetadata:includeTranscripts:jsonOptions:)

Returns the evaluation results as JSON data.

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)