AndyIbanez / andyibanez-com

Static website.
1 stars 0 forks source link

posts/the-mysterious-codablewithconfiguration-protocol/ #40

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

The Mysterious CodableWithConfiguration Protocol • Andy Ibanez

https://www.andyibanez.com/posts/the-mysterious-codablewithconfiguration-protocol/

CineDev commented 2 years ago

Thank you for the clarification of CodableConfiguration protocol! There's basically no other info of that. It's sad that CodableConfiguration protocol does not what I expected. When I saw the new AttributedString conforms to CodableConfiguration protocol I immediately thought that this will allow me to change Encoded/Decoded property types somehow. Because the AttributedString encoding/decoding implementation is too verbose. For instance, it encodes and decodes font value as an object data but I'd prefer just a string with the font family name. But, it looks like, I have to write a wrapper to achieve that.