Convert objects and values to and from property list, JSON, and other flat binary representations.
Framework
- Foundation
Convert objects and values to and from property list, JSON, and other flat binary representations.
Framework
Make your data types encodable and decodable for compatibility with external representations such as JSON.
typealias Codable
A type that can convert itself into and out of an external representation.
protocol NSCoding
A protocol that enables an object to be encoded and decoded for archiving and distribution.
protocol NSSecure Coding
A protocol that enables encoding and decoding in a manner that is robust against object substitution attacks.
Demonstrates approaches for encoding and decoding different kinds of JSON in Swift.
class JSONEncoder
An object that encodes instances of a data type as JSON objects.
class JSONDecoder
An object that decodes instances of a data type from JSON objects.
class JSONSerialization
An object that converts between JSON and the equivalent Foundation objects.
class Property List Encoder
An object that encodes instances of data types to a property list.
class Property List Decoder
An object that decodes instances of data types from a property list.
class Property List Serialization
An object that converts between a property list and one of several serialized representations.
Parse XML documents.
class NSKeyed Archiver
An encoder that stores an object’s data to an archive referenced by keys.
protocol NSKeyed Archiver Delegate
The optional methods implemented by the delegate of a keyed archiver.
class NSKeyed Unarchiver
A decoder that restores data from an archive referenced by keys.
protocol NSKeyed Unarchiver Delegate
The optional methods implemented by the delegate of a keyed unarchiver.
class NSCoder
An abstract class that serves as the basis for objects that enable archiving and distribution of other objects.
Create, read, write, and examine files and folders in the file system.
Persistently store domain-scoped pieces of information used to configure your app.
Search for files and other items on the local device, and index your app's content for searching.
Manage files and key-value data that are automatically synchronized among a user's iCloud devices.