Class
PropertyListEncoder
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
An object that encodes instances of data types to a property list.
class PropertyListEncoder
Topics
Initializers
init()Creates a new, reusable property list encoder with the default formatting settings.
Instance Properties
var outputFormat: PropertyListDecoder.PropertyListFormatA value that determines which property list format is used during encoding.var userInfo: [CodingUserInfoKey : any Sendable]A dictionary you use to customize the encoding process by providing contextual information.
Instance Methods
func encode<Value>(Value) throws -> DataReturns a property list that represents an encoded version of the value you supply.func encode(_:configuration:)
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype