Swift 4には新しいコードライディングプロトコルが導入されているため、特別なコードを記述することなく、また値の型を失うことを心配することなく、カスタムデータ型をシリアル化および逆シリアル化できます。
Useful Resources:
- Encoding and Decoding Custom Types - Article by Apple
- Using JSON with Custom Types - Swift Playground
- Also there is a special session from
WWDC2017
that covers this new feature - What's New in Foundation
引用元:https://github.com/Otbivnoe/CodableAlamofire
高橋 京介
SBクリエイティブ
2016-11-30
長谷川智希
秀和システム