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




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

func encode<Value>(Value)

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.

See Also

Property Lists

class PropertyListDecoder

An object that decodes instances of data types from a property list.

class PropertyListSerialization

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