<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/GeneratedContent/jsonString",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels16GeneratedContentV10jsonStringSSvp"
  },
  "title" : "jsonString"
}
-->

# jsonString

A JSON string representation of the generated content.

```
var jsonString: String { get }
```

## Discussion

Use this property to retrieve a JSON representation, like:

```swift
// Create an object with properties.
let content = GeneratedContent(properties: [
    "name": "Johnny Appleseed",
    "age": 30,
])
// Print the output: {"name": "Johnny Appleseed", "age": 30}
print(content.jsonString)
```

---

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)