Dictionary

@frozen
extension Dictionary where Key: Decodable, Value: Decodable
  • Undocumented

    Declaration

    Swift

    public static func decode(_ j: Any) throws -> Dictionary
  • Create a dictionary decoder from key- and value- decoders

    This function is used by => and =>? overloads when decoding [K: V]

    Declaration

    Swift

    public static func decoder(key keyDecoder: @escaping (Any) throws -> Key, value valueDecoder: @escaping (Any) throws -> Value) -> (Any) throws -> Dictionary

    Parameters

    key

    A decoder (decode closure) for the Key type

    value

    A decoder (decode closure) for the Value type

    Return Value

    A closure that takes a NSDictionary and maps it using key and value decode closures