[Answered] Why are these _JSONKey initializers failable?

(Tanner Bennett) #1

Code in question. Seems like these shouldn't be failable

cc @itaiferber

1 Like
(Itai Ferber) #2

These initializers are inherited from the CodingKey protocol, which defines them this way. The conformance could drop the optionality and still conform, but given that this is a fileprivate struct, I don't think it matters much either way.

(Tanner Bennett) #3

Ah, I see. Just wondering, thanks!

1 Like