Type Method

propertyList(from:options:format:)

Creates and returns a property list from the specified data.

Declaration

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 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.

error

If the method does not complete successfully, upon return contains an NSError object that describes the problem.

Return Value

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

Discussion