{"id":17443,"date":"2017-03-16T15:14:29","date_gmt":"2017-03-16T19:14:29","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=17443"},"modified":"2025-10-29T09:40:39","modified_gmt":"2025-10-29T13:40:39","slug":"foundation-swift-archival-serialization-proposal","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/03\/16\/foundation-swift-archival-serialization-proposal\/","title":{"rendered":"Foundation Swift Archival &#038; Serialization Proposal"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/itaiferber\/swift-evolution\/blob\/637532e2abcbdb9861e424359bb6dac99dc6b638\/proposals\/XXXX-swift-archival-serialization.md\">Itai Ferber et al.<\/a> (via <a href=\"https:\/\/forums.swift.org\/t\/proposal-foundation-swift-archival-serialization\/5456\">Swift Evolution<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/itaiferber\/swift-evolution\/blob\/637532e2abcbdb9861e424359bb6dac99dc6b638\/proposals\/XXXX-swift-archival-serialization.md\"><p>Foundation&rsquo;s current archival and serialization APIs (<code>NSCoding<\/code>, <code>NSJSONSerialization<\/code>, <code>NSPropertyListSerialization<\/code>, etc.), while fitting for the dynamism of Objective-C, do not always map optimally into Swift. This document lays out the design of an updated API that improves the developer experience of performing archival and serialization in Swift.<\/p>\n<p>Specifically:<\/p>\n<ul>\n<li>It aims to provide a solution for the archival of Swift <code>struct<\/code> and <code>enum<\/code> types<\/li>\n<li>It aims to provide a more type-safe solution for serializing to external formats, such as JSON and plist<\/li>\n<\/ul>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Itai Ferber et al. (via Swift Evolution): Foundation&rsquo;s current archival and serialization APIs (NSCoding, NSJSONSerialization, NSPropertyListSerialization, etc.), while fitting for the dynamism of Objective-C, do not always map optimally into Swift. This document lays out the design of an updated API that improves the developer experience of performing archival and serialization in Swift. Specifically: It [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-04-21T17:59:07Z","apple_news_api_id":"56891172-5d6c-4d7d-9275-b3a2c5ee9982","apple_news_api_modified_at":"2025-10-29T13:40:41Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AVokRcl1sTX2SdbOixe6Zgg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,31,507,46,30,71,2854,901],"class_list":["post-17443","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-ios","tag-json","tag-languagedesign","tag-mac","tag-programming","tag-swift-foundation","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=17443"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17443\/revisions"}],"predecessor-version":[{"id":28732,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17443\/revisions\/28732"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=17443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=17443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=17443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}