Add the following extensions to KeyedDecodingContainer
public extension KeyedDecodingContainer where Key: CodingKey {
/// SwifterSwift: Try to decode a Bool as Int then String before decoding as Bool.
///
/// - Parameter key: Key.
/// - Returns: Decoded Bool value.
/// - Throws: Decoding error.
public func decodeBoolAsIntOrString(forKey key: K) throws -> Bool { ... }
/// SwifterSwift: Try to decode a Bool as Int then String before decoding as Bool if present.
///
/// - Parameter key: Key.
/// - Returns: Decoded Bool value.
/// - Throws: Decoding error.
public func decodeBoolAsIntOrStringIfPresent(forKey key: K) throws -> Bool? { ... }
}
I can take this one ;)
@FraDeliro Go for it, I assigned it to you 馃殌
Thanks @omaralbeik 馃憤