Class

PropertyListSerialization

An object that converts between a property list and one of several serialized representations.

Declaration

class PropertyListSerialization : NSObject

Overview

The PropertyListSerialization class provides methods that convert a property list to and from several serialized formats. A property list is itself an array or dictionary that contains only NSData, NSString, NSArray, NSDictionary, NSDate, and NSNumber objects.

Property list objects are toll-free bridged with their respective Core Foundation types (CFData, CFString, and so on). See Toll-Free Bridging for more information on toll-free bridging.

Topics

Validating a Property List

class func propertyList(Any, isValidFor: PropertyListSerialization.PropertyListFormat) -> Bool

Returns a Boolean value that indicates whether a given property list is valid for a given format.

Constants

struct PropertyListSerialization.MutabilityOptions

These constants specify mutability options in property lists.

enum PropertyListSerialization.PropertyListFormat

These constants are used to specify a property list serialization format.

Error Codes

var NSPropertyListReadCorruptError: Int

Parsing of the property list failed.

var NSPropertyListReadUnknownVersionError: Int

The version number of the property list cannot be determined.

var NSPropertyListReadStreamError: Int

Reading of the property list failed.

var NSPropertyListWriteStreamError: Int

Writing to the property list failed.

var NSPropertyListWriteInvalidError: Int

Writing failed because of an invalid property list object, or an invalid property list type was specified.

var NSPropertyListErrorMinimum: Int

The start of the range of error codes reserved for property list errors.

var NSPropertyListErrorMaximum: Int

The end of the range of error codes reserved for property list errors.

Relationships

Inherits From

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software