<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/JSONWritingOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData18JSONWritingOptionsV"
  },
  "title" : "JSONWritingOptions"
}
-->

# JSONWritingOptions

A set of JSON file-reading options.

```
struct JSONWritingOptions
```

## Topics

### Initializers

[`init()`](/documentation/TabularData/JSONWritingOptions/init())

Creates a set of options for writing a JSON file.

### Instance Properties

[`var dateFormatter: (Date) -> String`](/documentation/TabularData/JSONWritingOptions/dateFormatter)

A closure that maps dates to their string representations.

[`var prettyPrint: Bool`](/documentation/TabularData/JSONWritingOptions/prettyPrint)

A Boolean value that indicates whether to split lines and indent the generated JSON.

[`var sortKeys: Bool`](/documentation/TabularData/JSONWritingOptions/sortKeys)

A Boolean value that indicates whether to sort the keys.

---

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)