You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading a framework to Swift 3 and to Decodable 0.5.
Before, we used to have a custom conformance to Decodable for Dates that was mapping a timestamp using timeIntervalSince1970, but obviously now that Date has a conformance to Decodable from this library itself we can't do that anymore.
Using the Customization that you provide should work, but the issue is that I'm using Decodable in a framework so there is no "entry point" where I can run the code to setup the decoder function. (I may have one that kind of works for the apps that use the framework, but that won't work for unit tests for example).
I can have a different decode method on Date an call that manually but I was curious if there is something I'm missing.
Cheers.
The text was updated successfully, but these errors were encountered:
Hm, interesting. This would be a concrete reason to remove DynamicDecodable and provide no default implementations of Decodable at all, which I didn't have the guts to do before.
What if the default implementations are available as a separate module? That way everyone can keep using them, and those of us who don't want a default impl, just don't import it :)
I realised the way SE-0166 stores primitive decoding information in Decoder objects is probably much more sane than Decodable's approach of putting them in protocol conformances. If there is still a place for Decodable in Swift 4, this might be worth looking in to.
Hi!
I'm upgrading a framework to Swift 3 and to Decodable 0.5.
Before, we used to have a custom conformance to Decodable for Dates that was mapping a timestamp using
timeIntervalSince1970
, but obviously now that Date has a conformance to Decodable from this library itself we can't do that anymore.Using the Customization that you provide should work, but the issue is that I'm using Decodable in a framework so there is no "entry point" where I can run the code to setup the
decoder
function. (I may have one that kind of works for the apps that use the framework, but that won't work for unit tests for example).I can have a different decode method on Date an call that manually but I was curious if there is something I'm missing.
Cheers.
The text was updated successfully, but these errors were encountered: