Skip to content

Serialization

Ken Harris edited this page Nov 5, 2020 · 3 revisions
  • NSArchiver (don't use)
    • introduced 10.0, deprecated 10.13
    • NSCoding, take 1
  • NSKeyedArchiver (probably don't use)
    • introduced 10.2, half deprecated in 10.14 to force upgrading to NSSecureCoding (10.8)
    • NSCoding, take 2
    • any type, as long as it conforms to NSCoding (and also NSObject -- ! -- which the docs don't say)
  • PropertyListSerialization (maybe use)
    • introduced 10.2 (still viable)
    • only supports 6 types: NSData, NSString, NSArray, NSDictionary, NSDate, NSNumber
  • JSONSerialization (maybe use)
    • introduced 10.7 (still viable)
    • used by Codable, when using JSONEncoder/JSONDecoder, I assume
    • can use it directly, or with an alternative wrapper like SwiftyJSON
  • Codable (maybe use)
    • introduced Xcode 9
    • Swift-only
    • any type, as long as it's Codable

Third-party options: TBD

Clone this wiki locally