---
title: "propertyList(from:options:format:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/propertylistserialization/propertylist(from:options:format:)"
---

# propertyList(from:options:format:)

Creates and returns a property list from the specified data.

## Declaration

```swift
class func propertyList(from data: Data, options opt: PropertyListSerialization.ReadOptions = [], format: UnsafeMutablePointer<PropertyListSerialization.PropertyListFormat>?) throws -> Any
```

## Parameters

- `data`: A data object containing a serialized property list.
- `opt`: The options used to create the property list. For possible values, see doc://com.apple.foundation/documentation/Foundation/PropertyListSerialization/MutabilityOptions.
- `format`: Upon return, contains the format that the property list was stored in. Pass nil if you do not need to know the format.

## Return Value

Return Value A property list object corresponding to the representation in data. If data is not in a supported format, returns nil.

## Discussion

Discussion note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Deserializing a Property List

- [propertyList(with:options:format:)](foundation/propertylistserialization/propertylist(with:options:format:).md)
