NilOnDecodingError

@propertyWrapper
public struct NilOnDecodingError<Wrapped>
extension NilOnDecodingError: Decodable where Wrapped: Decodable
extension NilOnDecodingError: Encodable where Wrapped: Encodable

property wrapper to easily handle a situation where we don’t want decoding to fail for 1 property which may be problematic. Instead just default it to nil

Available where Wrapped: Decodable

  • Declaration

    Swift

    public init(from decoder: Decoder) throws

Available where Wrapped: Encodable

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws