<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Codable on Andy Ibanez</title><link>https://www.andyibanez.com/tags/codable/</link><description>Recent content in Codable on Andy Ibanez</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 29 Sep 2021 07:00:00 -0400</lastBuildDate><atom:link href="https://www.andyibanez.com/tags/codable/index.xml" rel="self" type="application/rss+xml"/><item><title>The Mysterious CodableWithConfiguration Protocol</title><link>https://www.andyibanez.com/posts/the-mysterious-codablewithconfiguration-protocol/</link><pubDate>Wed, 29 Sep 2021 07:00:00 -0400</pubDate><guid>https://www.andyibanez.com/posts/the-mysterious-codablewithconfiguration-protocol/</guid><description>&lt;p&gt;The Mysterious CodableWithConfiguration Protocol&lt;/p&gt;
&lt;p&gt;Every year, at WWDC, Apple gives us a lot of new things to play around with. For the big new things, they prepare session videos and labs so developers can experiment with the new technologies and hopefully integrate them in their apps by the time the new OSes are out.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;big things&amp;rdquo; are one thing, but Apple introduces &lt;em&gt;a bunch&lt;/em&gt; of new APIs every year. Many (oh boy, &lt;strong&gt;many&lt;/strong&gt;) of them do not get any coverage at WWDC at all. Not in a session, and sometimes not even a small mention of them anywhere.&lt;/p&gt;</description></item><item><title>Parsing Tricky JSON With Codable in Swift</title><link>https://www.andyibanez.com/posts/parsing-tricky-json-codable-swift/</link><pubDate>Wed, 28 Oct 2020 07:00:00 -0400</pubDate><guid>https://www.andyibanez.com/posts/parsing-tricky-json-codable-swift/</guid><description>&lt;p&gt;If you have been writing Swift in the past couple of years, you have probably been using &lt;a href="https://developer.apple.com/documentation/swift/codable"&gt;&lt;code&gt;Codable&lt;/code&gt;&lt;/a&gt; (which is really just the composition of &lt;a href="https://developer.apple.com/documentation/swift/decodable"&gt;&lt;code&gt;Decodable&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://developer.apple.com/documentation/swift/encodable"&gt;&lt;code&gt;Encodable&lt;/code&gt;&lt;/a&gt; in the same protocol).&lt;/p&gt;
&lt;p&gt;If you have been writing iOS apps for longer, you likely know about &lt;a href="https://developer.apple.com/documentation/foundation/jsonserialization"&gt;&lt;code&gt;JSONSerialization&lt;/code&gt;&lt;/a&gt; as well, which is the backbone of &lt;code&gt;Codable&lt;/code&gt; and it allows you to do more manual work when parsing JSON, seemingly giving you more control.&lt;/p&gt;
&lt;p&gt;If you know &lt;code&gt;JSONSerialization&lt;/code&gt;, you have probably found times in which Codable seemingly doesn&amp;rsquo;t give you the flexibility you need, and you may have been tempted to drop &lt;code&gt;Codable&lt;/code&gt; in favor of &lt;code&gt;JSONSerialization&lt;/code&gt; when parsing very specific or even corrupted JSON.&lt;/p&gt;</description></item></channel></rss>