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/, republished 09/09/2022.