DAY #33

Codable (Part 3 of 4)

It is possible to make a custom keyDecodingStrategy. However, I think it is not worth the effort since working with strings in Swift is the most annoying thing ever. You might as well hardcode everything like in day #31 at that point - it’ll make your app faster.

See here for example implementation: https://martiancraft.com/blog/2018/08/Implementing-custom-key-strategy-for-coding-types/

Originally published 09/18/2021 @ https://pittcsc.org/ Discord

Published here on 09/09/2022. Blog published date reflects the original date of publication.