---
title: jsonString
framework: foundationmodels
role: symbol
role_heading: Instance Property
path: foundationmodels/generatedcontent/jsonstring
---

# jsonString

Returns a JSON string representation of the generated content.

## Declaration

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

## Examples

Examples // Object with properties let content = GeneratedContent(properties: [     "name": "Johnny Appleseed",     "age": 30, ]) print(content.jsonString) // Output: {"name": "Johnny Appleseed", "age": 30}

## See Also

### Accessing the content

- [kind](foundationmodels/generatedcontent/kind-swift.property.md)
- [GeneratedContent.Kind](foundationmodels/generatedcontent/kind-swift.enum.md)
- [value(_:)](foundationmodels/generatedcontent/value(_:).md)
- [value(_:forProperty:)](foundationmodels/generatedcontent/value(_:forproperty:).md)
- [isComplete](foundationmodels/generatedcontent/iscomplete.md)
- [generatedContent](foundationmodels/generatedcontent/generatedcontent.md)
- [debugDescription](foundationmodels/generatedcontent/debugdescription.md)
