DKResponseListAny

public struct DKResponseListAny

Similar to DKResponseListSerializable, the DKResponseListAny is a serializer that generates an array of objects of any type. This extension is useful when handling results from Dropmark’s /activity endpoint, which returns a variety of object types.

  • Serializes a list of new objects (of DKCollection, DKItem, DKReaction, DKComment, or DKInvite types) from the provided network response and key-value representation. The representation is validated for the required list.

    Declaration

    Swift

    public static func list(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Any]

    Parameters

    response

    A network response assocated with serialization

    representation

    A key-value object representing a list of objects.