Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Preview
Start a free Basic trial
to watch this video
Similar to how we decoded dates, in this video let's take a look at how a decoder can automatically handle URLs, data and floating point numbers.
Documentation
- Base64
- JSONDecoder.DataDecodingStrategy Enumeration Reference
- JSONDecoder.NonConformingFloatDecodingStrategy
Code Snippets
import Foundation
extension Data {
public var stringDescription: String {
return String(data: self, encoding: .utf8)!
}
}
You need to sign up for Treehouse in order to download course files.
Sign up