---
title: "propertyListFromData(_:mutabilityOption:format:errorDescription:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/propertylistserialization/propertylistfromdata(_:mutabilityoption:format:errordescription:)"
---

# propertyListFromData(_:mutabilityOption:format:errorDescription:)

This method is deprecated. Use data(fromPropertyList:format:options:) instead.

## Declaration

```swift
class func propertyListFromData(_ data: Data, mutabilityOption opt: PropertyListSerialization.MutabilityOptions = [], format: UnsafeMutablePointer<PropertyListSerialization.PropertyListFormat>?, errorDescription errorString: UnsafeMutablePointer<NSString?>?) -> 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`: If the property list is valid, upon return contains the format. format can be nil, in which case the property list format is not returned. For possible values, see doc://com.apple.foundation/documentation/Foundation/PropertyListSerialization/PropertyListFormat.
- `errorString`: Upon return, if the conversion is successful, errorString is nil. If the conversion fails, upon return contains a string describing the nature of the error.

## Return Value

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

## See Also

### Related Documentation

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

### Obsolete Methods

- [dataFromPropertyList(_:format:errorDescription:)](foundation/propertylistserialization/datafrompropertylist(_:format:errordescription:).md)
