Array

@frozen
extension Array where Element: Decodable
  • Undocumented

    Declaration

    Swift

    public static func decode(_ j: Any, ignoreInvalidObjects: Bool = false) throws -> [Element]
  • Creates an array decoder from an element decoder

    This function is used by => and =>? overloads when decoding [T]

    Throws

    if NSArray.decode throws or any element decode closure throws

    Declaration

    Swift

    public static func decoder(_ elementDecoder: @escaping (Any) throws -> Element) -> (Any) throws -> Array<Element>

    Parameters

    elementDecoder

    A decoder (decode closure) for the Element type

    Return Value

    A closure that takes an NSArray and maps it using the element decode closure