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.