KeyedDecodingContainer

public extension KeyedDecodingContainer
  • SwifterSwift: Try to decode a Bool as Int then String before decoding as Bool.

    Throws

    Decoding error.

    Declaration

    Swift

    func decodeBoolAsIntOrString(forKey key: Key) throws -> Bool

    Parameters

    key

    Key.

    Return Value

    Decoded Bool value.

  • SwifterSwift: Try to decode a Bool as Int then String before decoding as Bool if present.

    Throws

    Decoding error.

    Declaration

    Swift

    func decodeBoolAsIntOrStringIfPresent(forKey key: Key) throws -> Bool?

    Parameters

    key

    Key.

    Return Value

    Decoded Bool value.