我Codable第一次使用Swift 4的协议,我无法理解使用decodeIfPresentfrom Decodable.
/// Decodes a value of the given type for the given key, if present.
///
/// This method returns `nil` if the container does not have a value associated with `key`, or if the value is null. The difference between these states can be distinguished with a `contains(_:)` call.
///
/// - parameter type: The type of value to decode.
/// - parameter key: The key that the decoded value is associated …Run Code Online (Sandbox Code Playgroud)