---
title: prettyPrinted
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/jsonserialization/writingoptions/prettyprinted
---

# prettyPrinted

Specifies that the output uses white space and indentation to make the resulting data more readable.

## Declaration

```swift
static var prettyPrinted: JSONSerialization.WritingOptions { get }
```

## Discussion

Discussion If this option isn’t set, the serialization generates the most compact possible JSON representation.

## See Also

### Formatting JSON

- [fragmentsAllowed](foundation/jsonserialization/writingoptions/fragmentsallowed.md)
- [sortedKeys](foundation/jsonserialization/writingoptions/sortedkeys.md)
- [withoutEscapingSlashes](foundation/jsonserialization/writingoptions/withoutescapingslashes.md)
