Class

PropertyListEncoder

An object that encodes instances of data types to a property list.

Declaration

class PropertyListEncoder

Topics

Encoding

init()

Creates a new, reusable property list encoder with the default formatting settings.

func encode<Value>(Value) -> Data

Returns a property list that represents an encoded version of the value you supply.

Customizing Encoding

var outputFormat: PropertyListSerialization.PropertyListFormat

A value that determines which property list format is used during encoding.

var userInfo: [CodingUserInfoKey : Any]

A dictionary you use to customize the encoding process by providing contextual information.

Relationships

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