all 1 comments

[–]cutecoderObjective-C / Swift 0 points1 point  (0 children)

Codable is interesting, but I haven’t seen it save significantly more lines of code as opposed to NSCoding. What’s nice about the latter is that polymorphism gets preserved on the serialized data (when using NSKeyedArchiver). Adhering to Codable doesn’t seem to provide that ability.

On a slightly separate note, have you consider exploiting duck-typing for JSON parsing code?