Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 590 Bytes

README.md

File metadata and controls

8 lines (5 loc) · 590 Bytes

TypedCodable

Heavily inspired from Swift 4.2 Decodable: Heterogeneous collections by Kewin Dannerfjord Remeczki.

Original code is modified in order to support NSKeyed(Un)archiver in addition to JSONEncoder/Decoder. Additionally, a TypedCodable protocol is introduced, to factorize the code snippet needed to introduce the type information at encoding time.

See Tests/TypedCodableTests/TypedCodableTests.swift for a usage example.